[英]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) error
My form is consistently getting an error when I try to submit. 我尝试提交时,我的表单一直出错。
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). 无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器。
I'm on windows by the way. 顺便说一句,我在窗户上。 https://web.njit.edu/~jsd42/form/form1.php
https://web.njit.edu/~jsd42/form/form1.php
You need to configure your MySQL user and your php mysqli_connect() to both use "localhost" as the connecting host. 您需要配置MySQL用户和php mysqli_connect()以使用“localhost”作为连接主机。
Edit: If it is a remote server instead of "localhost" you will need to use the IP of the mysql server and ensure that the user you are logging in as has permission to connect externally. 编辑:如果它是远程服务器而不是“localhost”,您将需要使用mysql服务器的IP并确保您登录的用户具有外部连接权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.