1、Mysql解決access deined fror user 'root'@localhost
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
2、解決1130 -host 'localhost' is not allowed to connect to this mysql server
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION

本文介绍了解决MySQL中遇到的两种常见权限问题的方法:一是解决root用户无法登录的问题,通过更新root用户的密码来重新获取访问权限;二是解决特定主机无法连接到MySQL服务器的问题,通过授予root用户所有权限来实现。
1274

被折叠的 条评论
为什么被折叠?



