Home >Database >Mysql Tutorial >使MySQL可以远程访问_MySQL

使MySQL可以远程访问_MySQL

WBOY
WBOYOriginal
2016-06-01 13:49:22943browse

bitsCN.com

默认情况下, MySQL只支持本地访问, 如需远程访问需在cmd进入MySQL.exe所在路径执行如下指令
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'rootpasswd' WITH GRANT OPTION; ///输入这段指令并回车后允许所有用root用户并且输入rootpasswd密码的主机登入该mysql Server 如果将'%'换成'10.1.1.1'那么只有10.1.1.1的主机可以登陆.
Query OK, 0 rows affected (0.07 sec)
如此就可以配置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