CentOS 7 crack the password mariadb

1. Stop mariadb service: systemctl stop mariadb

2, single-user mode: mysqld_safe --skip-grant-tables &

3, a switch to another log in the root and working group, switching shortcut key combination: Ctrl + Alt + F2 // All the following operations were carried out on this environment

4, log mariadb: mysql -uroot

5, switching to mysql: use mysql; // here inside mariadb operation, it is necessary to add the symbol ';'

6. Change Password: update user set password = password ( '123456') where user = 'root'; // here I change the password to 123456

7, refresh permissions: flush privileges;

8, mariadb exit and restart the system, so mariadb to break complete.

Guess you like

Origin blog.csdn.net/a4132447/article/details/95116711