修改mysqld.cnf文件添加skip-grant-tables 后重启,奇怪问题就开始了
使用命令
alter user root@localhost identified by "newpass"
提示如下错误:
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
这个错误是要执行
flush privileges;
flush执行之后再使用
alter user root@localhost identified by "newpass"
提示
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded
这个"auth_socket"的解决办法是重启,重启后先执行flush命令,再执行alter命令还是会报"
auth_socket“错误。
同样的root密码初始化配置在另一台电脑上配置成功,但现在用的这台就会报错!