cfanbo / cfanbo.github.io

1 stars 0 forks source link

在PHP中如何远程链接Mysql数据库? | 学习笔记 #225

Open cfanbo opened 11 months ago

cfanbo commented 11 months ago

https://blog.haohtml.com/archives/39/

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