Home  >  Article  >  Database  >  Ubuntu下取消MySQL数据库本机绑定限制方法_MySQL

Ubuntu下取消MySQL数据库本机绑定限制方法_MySQL

WBOY
WBOYOriginal
2016-06-01 13:25:08974browse

Ubuntu

bitsCN.com

出现问题:在Ubuntu系统中,添加了MySQL账户,赋予了数据库完全操作权限,并且允许数据库从外部链接
但是,还是无法远程访问MySQL数据库。

原因:Ubuntu系统中,默认安装的MySQL限制了只有本机才能访问数据库

解决办法:取消MySQL数据库的本机绑定限制

nano /etc/mysql/my.cnf #编辑配置文件
找到bind-address = 127.0.0.1

改为

#bind-address = 127.0.0.1
ctrl+o #保存配置
ctrl+x #退出
/etc/init.d/mysql restart #重启数据库

现在已经可以远程连接MySQL数据库了

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn