1、在/etc/mysql/my.cnf中的[mysqld]段注释掉bind-address = 127.0.0.1
2、用mysql -uroot -p 登陆mysql,然后采用以下方法开启远程访问权限:
方法1:mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>FLUSH RIVILEGES;
方法2:mysql>GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com