I. Overview
Maraidb server installed on the database, but has not used it for a long time, you need to use, forget the password, then you can give it to reset your password.
Second, the operating
change Password
- /Etc/my.cnf modified, modifying the position of FIG red region, and modified in the same can.
- Restart the service: systemctl restart mariadb.service
- Change password: mysql -u root enter into the mysql mode, perform the modification command "update mysql.user set password = password ( 'new password') where user = 'root';" Enter, Run "flush privileges;" enter, enter quit to exit mysql mode
- Restart the service: systemctl restart mariadb.service
- Passcode: Enter mysql -u -root -p Enter, enter the new password to see if it successfully entered the mysql mode, successfully represented correctly;