Saturday, June 22, 2013

Mysql Error, service refusing to start


Here is a scenario where the mysql service was refusing to start and the site was reported as down as a result.. not a good sight.. when you were not the person who is maintaining it and the client runs to you for quick help.

Read on to checkout what took it to get it back running..

[root@WEB2 ~]# /etc/init.d/mysqld start

MySQL Daemon failed to start.

Starting mysqld: [FAILED]

Reading through some of mysql logs.. It was evident from the below logs whats is going on when the service was tried to start:

130113 11:26:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql130113 11:26:47 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 481 error messages,

but it should contain at least 641 error messages.

Check that the above file is the right version for this program!

/usr/libexec/mysqld: Unknown error 1146

130113 11:26:47 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

130113 11:26:47 InnoDB: Initializing buffer pool, size = 8.0M

130113 11:26:47 InnoDB: Completed initialization of buffer pool

130113 11:26:47 InnoDB: Started; log sequence number 0 43655

130113 11:26:47 [ERROR] Aborting

130113 11:26:47 InnoDB: Starting shutdown...

Check if really there are mysql versions/dependencies installed on your mysql server:
 
[wiz@WEB2 run]$ sudo yum list installed | grep mysql

libdbi-dbd-mysql.x86_64 0.8.1a-1.2.2 installed

mysql.i386 5.0.95-3.el5 installed

mysql.x86_64 5.1.58-jason.1 installed

mysql-connector-odbc.x86_64 3.51.26r1127-2.el5 installed

mysql-server.x86_64 5.1.58-jason.1 installed

mysqlclient15.x86_64 5.0.91-1.jason.1 installed

php53-mysql.x86_64 5.3.3-13.el5_8 installed 
 
 
  
[wiz@WEB2 run]$ arch

x86_64

The person (possibly the client) installed two versions of the software..

It was evident that there are two versions of mysql present on the machine after the yum update on the machine.

Due to which the mysql startup script is unable to start as it was terminating startup sequence..

The FIX

What you need to do to fix this issue..  Replace the file '/usr/share/mysql/english/errmsg.sys' with the same file from mysql.5.1.58 version and ensure it has only single version of mysql architecture installed.

HTH.

No comments:

Post a Comment