mysql.sock
|
5 posts
|
Hi, I'm trying to install frogcms for a while now but I always get the following error. SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I tried several variations for the host like ip, ip:port, localhost or the path to mysql.sock. But I still get the error. Any suggestions what my mistake coulde be? |
|
651 posts
|
Philip, Sounds like a problem with your MySQL installation.
|
|
5 posts
|
Hi,
|
|
651 posts
|
philip, The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket filename or TCP/IP port number when trying to connect to the server. So, please: 1) Verify that MySQL is running 2) Check which port MySQL is running on (default is port 3306) 3) Contact your hosting provide and give them the error. They should be able to quickly check the above two points and check whether the correct unix socket filename is used. If you have shell access, you should be able to verify points 1 and 2 yourself by doing the following:
This should give you a MySQL prompt, you can then check which databases exist with the following command:
If you get a reply with at least one row in the resultset, points 1 and 2 are fine.. the problem most likely lies with your MySQL server and you should contact their support desk. If your MySQL is not running on the default port... you will need to tell Frog what port to use, in config.php define the following:
Replace the "####" with the port that MySQL is running on. NOTE - this port number will be ignored if the host is localhost. If you want to connect to a local port other than the default, you have to use host=127.0.0.1 instead of localhost. |
|
5 posts
|
Thank you! The solution was to use 127.0.0.1 instead of localhost. |