如题:使用Navicat连接mysql时报错:1045-Acess denied for user:'root'@'192.100.1.243'(Using password:YES)开始的时候错误是:1130 - Host'192.100.1.243' is not allowed to connect to this MySQL server,google到解决办法是在mysql下执行:grant all privileges on *.* to 'root'@'%' identified by 'rootpasswd' with grant option;
结果就开始报1045的错误。我的mysql已启动(使用service mysqld status查看已是running状态),root已设置密码。
这种情况我该检查哪些方面呢?
结果就开始报1045的错误。我的mysql已启动(使用service mysqld status查看已是running状态),root已设置密码。
这种情况我该检查哪些方面呢?
grant all privileges on *.* to 'root'@'localhost' identified by 'rootpasswd' with grant option;
再flush privileges;
【
# /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# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>mysql>】感谢iihero!!!