mysql远程访问被拒绝问题
远程连接MySql数据库时:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
远程连接被拒绝;
解决方法:
MySQL> use MySQL;
Database changed
MySQL> grant all privileges on *.* to ‘yourUser’@'%' identified by ‘yourPassword’;
Query OK, 0 rows affected (0.00 sec)
*.*标示所有数据库下的所有表,’*’.*标示数据库*下的所有表
MySQL> grant all on *.* to ‘yourUser’@'%' identified by ‘yourPassword’;
Query OK, 0 rows affected (0.00 sec)
%号出可以填写允许访问的IP地址或者主机名,%标示所有的IP
Flush privileges;
Query OK, 0 rows affected (0.00 sec)
Mysql> exit;
我就是一个菜鸟!