[英]How to find the mysql IP address in shared host?
I got the issue of PDO connectivity.I found the solution in this thread to connect the mysql through the Mysql IP address.But I dont how to find the IP address of the mysql.Could you please help on this. 我遇到了PDO连接的问题。我在此线程中找到了通过Mysql IP地址连接mysql的解决方案。但是我没有如何找到mysql的IP地址。请您提供帮助。 I am in shared host. 我在共享主机中。
如果MySql与您的Web主机不在同一服务器上,则可能需要检查共享主机的欢迎电子邮件或向他们发送支持请求。
Try this: 尝试这个:
<?php
echo $_SERVER['SERVER_ADDR'];
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.