From the course: Linux System Engineer: Database Servers Using MariaDB

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Recover the MariaDB root password

Recover the MariaDB root password

From the course: Linux System Engineer: Database Servers Using MariaDB

Start my 1-month free trial

Recover the MariaDB root password

- [Instructor] On occasion, you may not remember your database root user password and need to reset it without having access to the old one. You need super user privileges do this, so not just anyone can reset the database root user password. First we need to stop the MariaDB server. In a terminal type in sudo space systemctl space stop space mariadb and hit enter. Type in your password as prompted. Then we need to run the mysqld_safeserver with the skip grant tables options. Type in sudo space mysqld_safe space --skip-grant-tables space ampersand and then hit enter. Then hit enter again. Be sure to add the ampersand at the end or it will tie up your terminal. The --skip-grant-tables option start mysquld without authentication. Now login to mysql as the database root user without a password by typing in mysql space -u space root space -p and hit enter. And hit enter again when prompted for a password. Now we'll reset the password the way we did in our previous video. We want to start…

Contents