root密码修改:mysql> use mysql;mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';mysql> FLUSH PRIVILEGES; 问题:Access denied for user 'root'@'192.168.46.161' to database 'db3' mysql> grant all on db3.* to 'root'@'%' identified
.修改/etc/my.conf,添加参数skip-grant-tables .重启mysql service mysqld stop service mysqld start .用root 直接登录 [root@bogon ~]# mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id Server version: MySQL Community Server