From the course: Red Hat Enterprise Linux 8 Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Recover the MariaDB root password
From the course: Red Hat Enterprise Linux 8 Essential Training
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 superuser privileges to do this, so not just anyone can reset the database root user password. First, we need to stop the MariaDB server. In our terminal type in sudo systemctl stop mariadb and hit Enter. Type in your password if prompted. Then we need to run the mysqld_safe server with a skip grant tables option. Type in sudo mysqld_safe --skip-grant-tables & and 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 starts mysqld without authentication. Now log into mysql as a database root user without a password by typing in mysql -u root -p and hit Enter, and hit Enter again when prompted for a password. Now we'll reset the password the way we did in a previous video. We want to start by switching to the mysql database. Type in use mysql; and hit…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Database services introduction44s
-
Install and configure MariaDB2m 3s
-
Manage SELinux for database services2m 58s
-
Perform logical database backups4m 5s
-
Create a database with tables4m 37s
-
Restore logical database backups2m 17s
-
Perform simple SQL queries3m 1s
-
Perform logical database backups4m 5s
-
Restore logical database backups2m 17s
-
Recover the MariaDB root password2m 47s
-
Set the root database password2m 8s
-
-
-
-
-
-
-
-