Web Hosting Knowledge Base

Knowledge Base » General Information » “Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock” error appears on my website3 min read

“Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock” error appears on my website3 min read

The error message “Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock” appears because you are trying to connect to your database using incorrect MySQL database host/server.

Most content management systems and database connection scripts use “localhost” as MySQL database host/server. In our hosting environment, you will have to explicitly specify the database host as it is listed in your control panel. For more information on your MySQL database connection settings please click HERE.

AwardSpace on Social Media

It's Time to Share Your Story.

Get Free Web Hosting. Start a website, and introduce yourself to the world.

Share This

Share This

Share this post with your friends!