Bug #61808 Can't mysql_upgrade because mysql.sock doesn't exist
Submitted: 9 Jul 2011 23:31 Modified: 31 Jan 2012 15:07
Reporter: Mario Halkyer Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.52 OS:Linux (CentOS)
Assigned to: CPU Architecture:Any

[9 Jul 2011 23:31] Mario Halkyer
After updating from PHP 5.1 to 5.2.16 I'm unable to restart MySQL with '/etc/init.d/mysqld start'. After the PHP update it said I would have to do 'mysql_upgrade' but when I try this command I get the following error:

   mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
   FATAL ERROR: Upgrade failed

I've tried completely uninstalling and reinstalling MySQL with no avail. Upon searching I've found that mysql.sock does NOT exists in any of the following locations:


I've tried running 'mysqld_safe &' but it doesn't generate the mysql.sock, it just outputs these messages:

   mysqld_safe Logging to '/var/log/mysqld.log'.
   mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
   mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

I've also tried '/usr/bin/mysql_install_db' but it doesn't help. Here's what it says:

   Installing MySQL system tables...
   Error message file '/usr/share/mysql/english/errmsg.sys' had only 480 error messages, but it should contain at least 641 error messages.
   Check that the above file is the right version for this program!
   [ERROR] Aborting
   Installation of system tables failed! 

I've read all the solutions here (http://bugs.mysql.com/bug.php?id=4174) but none of them have helped. Please help, I've tried everything!

How to repeat:
run '/etc/init.d/mysqld start'
[10 Jul 2011 8:51] Valeriy Kravchuk
What version of MySQL server, x.y.z, do you use? Please, upload also entire error log of MySQL server (compressed if it is big).
[10 Jul 2011 18:07] Mario Halkyer
MySQL error log

Attachment: errmsg.sys (application/octet-stream, text), 26.23 KiB.

[10 Jul 2011 18:26] Mario Halkyer
I attached the errmsg.sys and here's what's listed when I run 'yum list installed mysql' :

Installed Packages
mysql.i386   5.0.77-4.el5_6.6   installed
mysql.x86_64   5.1.52-jason.1   installed
[10 Jul 2011 19:04] Mario Halkyer
I ran 'yum list installed | grep mysql'

mysql.i386                             5.0.77-4.el5_6.6                installed
mysql.x86_64                           5.1.52-jason.1                  installed
mysql-server.x86_64                    5.1.52-jason.1                  installed
mysqlclient15.x86_64                   5.0.91-1.jason.1                installed

I'm guessing I shouldn't have 32bit and 64bit installed at the same time. Should I 'yum remove' mysql.i386 and mysqlclient15.x86_64?
[11 Jul 2011 15:50] Mario Halkyer
I just fixed my problem. I backed up the errmsg.sys and then replaced it with the copy from the installation files. I used this link:


Unzipped it, backed up errmsg.sys, started mysqld_safe& in the background, then ran 'mysql_upgrade -u root -p' without any problems!

Was this all seriously because of an error log file? (errmsg.sys)
[31 Dec 2011 15:07] Valeriy Kravchuk
errmsg.sys is a file with error messages text, this is not an error log... and yes, looks like you had bad one. Had you even seen the same problem with newer version (5.1.60 is the latest)?
[1 Feb 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".