1、检查是否有防火墙限制
2、检查mysql是否有访问权限
命令:use mysql;
命令:Grant all privileges on . to ‘root’@’%’ identified by ‘kdm001’ with grant option;
命令:flush privileges;
3、检查my.ini(linux下是/etc/mysql/mysql.conf.d/mysqld.cnf)文件里是否设置了bind-address 参数,如果有将该条注释掉即可。
4、在my.ini中添加skip-name-resolve
命令:vi /etc/my.cnf
[mysqld] 段加skip-name-resolve
5、修改hosts.allow
命令:vi /etc/hosts.allow
加mysqld : ALL : ALLOW
mysqld-max : ALL :ALLOW
mysql开放权限代码
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY '123’;
flush privileges;
网友评论