登录Mysql的时候提示没有权限登录, 一定是密码不对, 但是又不记得密码了. 那么重置下root密码吧
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
Setup new MySQL root user password
use mysql;
update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
flush privileges;
修改密码的时候出现的如下错误
错误描述:
mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解决方法:
先刷新一下权限表。
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)