mariadb10 忘记密码

2021-11-18  本文已影响0人  明翼

skip-grant-tables
启动,登录更改密码,记得先要privileges

MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]> SET PASSWORD FOR 'root'@localhost = PASSWORD("");
ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.023 sec)

MariaDB [mysql]> SET PASSWORD FOR 'root'@localhost = PASSWORD("root1234");
Query OK, 0 rows affected (0.000 sec)

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [mysql]> quit

上一篇下一篇

猜你喜欢

热点阅读