Home >Database >Mysql Tutorial >window下连接ubuntu mysql的问题_MySQL

window下连接ubuntu mysql的问题_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:30:501237browse

Ubuntu

bitsCN.com

window下连接ubuntu mysql的问题

 

默认window下无法连接ubuntu上的mysql的。

 

所以需要做两件事情

 

第一修改/etc/mysql/my.cnf 文件的第52行 bind-address  = 127.0.0.1 注释掉。

 

这样ubuntu上的3306端口才才会监听除了本地机器以外的连接请求。

 

第二  

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'password' WITH GRANT OPTION;
 对root用户在其他机器登录授权。

 

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