Home  >  Article  >  Database  >  mysql开启远程访问_MySQL

mysql开启远程访问_MySQL

WBOY
WBOYOriginal
2016-06-01 13:17:271019browse

mysql -uroot -p

输入密码,执行下面这条语句

grant all privileges on *.* to ‘user‘@’%‘ identified by ‘password‘ with grant option;

其中,user是用户名,mysql默认的是root ,password是密码自己设置 。%表示任意主机。这样就允许远程任意一台主机访问了。

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