[resolved] Mysql : Connection failed: SQLSTATE[HY000] - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: [resolved] Mysql : Connection failed: SQLSTATE[HY000] (/thread-9080.html) |
[resolved] Mysql : Connection failed: SQLSTATE[HY000] - theprincy - 01-05-2010 02:46 AM I have this error on a server Code: Connection failed: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) RE: Mysql : Connection failed: SQLSTATE[HY000] - theprincy - 01-05-2010 05:13 AM and now i have Connection failed: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) how can I solve? RE: Mysql : Connection failed: SQLSTATE[HY000] - motokochan - 01-05-2010 05:37 AM What are you trying to do when you get this message? RE: Mysql : Connection failed: SQLSTATE[HY000] - kurgans - 01-05-2010 06:02 AM I feel my English, I speak only Spanish and is very difficult for my help. Google translate does not translate and what may cause a more serious error in your system I had that problem and same error message was caused by rupture of maia database. If it can not be your problem like mine. You can test if this is the error renaming /var/lib/mysql/maia to /var/lib/mysql/maia1 Restart mysql If that's not the error try the rest of their databases I hope to help you in your problem RE: Mysql : Connection failed: SQLSTATE[HY000] - theprincy - 01-05-2010 07:35 PM hate google translate :@ then the problems I had I got around them on that server, now on another machine Connection failed: SQLSTATE [HY000] [2002] Can not connect to local MySQL server through socket '/ var / run / mysqld / mysqld.sock' (2) the solution seems easy enough to create the file myslqld.sock and start the MySQL daemon unfortunately it is not so root@torino:/var/run/mysqld# touch /var/run/mysqld/mysqld.sock root@torino:/var/run/mysqld# chown mysql /var/run/mysqld/mysqld.sock root@torino:/var/run/mysqld# !/etc /etc/init.d/mysql start Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed! root@torino:/var/run/mysqld# ls -sl totale 0 root@torino:/var/run/mysqld# ls -asl totale 8 4 drwxrwxrwx 2 mysql root 4096 5 gen 10:25 . 4 drwxr-xr-x 14 root root 4096 5 gen 10:18 .. the file mysqld.sock erased ideas for the solution? __________________________________________________________________ mistero del informatica : ha ripreso a funzionare da solo (01-05-2010 05:13 AM)theprincy Wrote: and now i have (01-05-2010 05:37 AM)motokochan Wrote: What are you trying to do when you get this message? message out when you sign on the panel that both sites then mistakenly Connection failed: SQLSTATE [HY000] [2002] Can not connect to local MySQL server through socket '/ var / run / mysqld / mysqld.sock' (111) I solved this way, but I'm not sure that is the correct way or if there are other solutions easier. Then I deleted apache2 php5-mysql mysql-server and then install it again while error Connection failed: SQLSTATE [HY000] [2002] Can not connect to local MySQL server through socket '/ var / run / mysqld / mysqld.sock' (13) I completed these steps, cd / var / run / mysqld / rm-Rf mysqld.sock touch / var / run / mysqld / mysqld.sock chown mysql: mysql mysqld.sock / etc / init.d / mysql start RE: [resolved] Mysql : Connection failed: SQLSTATE[HY000] - motokochan - 01-06-2010 03:08 AM You don't want to create the socket manually. It will keep MySQL from working if it tries to make one there. Likely, your socket file is somewhere else. You should check the MySQL init script and /etc/my.cnf to see if it is pointed elsewhere. RE: [resolved] Mysql : Connection failed: SQLSTATE[HY000] - theprincy - 01-06-2010 05:56 AM (01-06-2010 03:08 AM)motokochan Wrote: You don't want to create the socket manually. It will keep MySQL from working if it tries to make one there. Likely, your socket file is somewhere else. You should check the MySQL init script and /etc/my.cnf to see if it is pointed elsewhere. Indeed it should create the file automatically when you start mysql, but if steps are not going to create it and start the daemon bed at mysql.com |