Error mysql
Dear all,
Please everyone help me. I am now using SLES11. My web server now error mysql. However, when I restart mysql using "rcmysql restart" the message display: Restarting service MySQL Shutting down service MySQL done Starting service MySQL done .......................... but when I start to access via browser using my name virtual host (http://wordpress.group4.com) the message display "Error establishing a database connection" when I go to mysql using command "mysql" the message display" ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) After that I try to edit file mysql.sock but on the bottom of file display message (permission denied) Please you Tell me the easy way to fix these problem. Sincerely, Rathina |
Hi -
1. You're exactly right: the best way to troubleshoot this problem is with the "mysql" client. You need to be able to "connect" with mysql before you go any further. 2. No, you don't need to "edit" '/var/lib/mysql/mysql.sock. It's automatically (re)created by MySQL every time you restart the server. SUGGESTIONS: 3. This is good troubleshooting advice for "mysql 2002": http://dev.mysql.com/doc/refman/5.1/...to-server.html 4. Check your MySQL configuration file (EX: /etc/my.cnf) a) Make sure your "datadir" exists and is writable by mysql b) Make sure the directory for your "socket" (EX: /var/lib/mysql) exists and is writable 5. Make sure you can "ping localhost" (and, hopefully, you'll get an address like "127.0.0.1" back) 'Hope that helps .. PSM |
Quote:
|
Oh! I have already check /etc/my.cnf already exist and /var/lib/mysql also writable
and I also can ping to localhost with the message reply"64 bytes reply from localhost (127.0.0.1)....... but MySQL still not running and for "datadir" I don't understand whether you wanna talk about what? Your truely, Rathina |
Hi, again -
1. Please double-check my.cnf. Please make sure the socket file/path it specifies is the same one in the error message, and the same one you checked. In other words, please make sure there aren't TWO socket files somehow being created. 2. Look at these two log files for any MySQL-related errors or warnings: # System log /var/log/messages # MySQL /var/log/mysqld.log 3. Please DISABLE "AppArmour" (if only temporarily, for debugging/troubleshooting purposes) and see if that helps. 4. Look at these links: http://lists.mysql.com/mysql/205056 http://www.linuxquestions.org/questi...-mysql-237016/ http://forums.mysql.com/read.php?11,27769,102905 'Hope that helps .. PSM |
Dear Paulsm4,
Thanks for your kindly help... I am sorry for being late reply :redface:. Your solution was very help full for me.:):hattip: Best Regards, Rathina SOK |
Did this website ever work with wordpress?
If so and if it then stopped working, then it sounds to me, sadly, that the database may be severely damaged. Been there, done that. If you have shell access to the server, logging into mysql from the command line and running mysqlcheck might turn up something. Here is a website that discusses in clear terms ways to repair a mysql database. http://www.felipecruz.com/repair-mysql-database.php |
All times are GMT -5. The time now is 05:46 AM. |