Home > php教程 > php手册 > 如何远程链接Mysql数据库?

如何远程链接Mysql数据库?

WBOY
Release: 2016-06-13 09:54:22
Original
1226 people have browsed it

MySQL是可以远程调用的,但用户要有远程调用的权限。
在增加用户的时候有一个host 选项,是任何主机 或 locahost,你选用 any host,这样,你就可以远程调用了。
mysql_pconnect("192.168.0.2:3306","root","password");

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template