在 CentOS 上安装完MySQL后,默认不开始远程访问控制。可以进行如下设定开启。
登录MySQL:
mysql -uroot -p
如需修改密码,第一次:
mysqladmin -u root password NEWPASSWORD
已设置过:
mysqladmin -u root -p 'oldpassword' password newpassword
执行以下命令开启远程访问限制
grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'password' with grant option;
flush privileges;
exit
上面的是开启的IP 192.168.0.1的,如要开启所有的,用%代替IP
更多 Oracle 相关信息见 CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14
查看更多关于CentOS上开启MySQL远程访问权限的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did22029