MySQL Daemon failed to start. Starting mysqld: [FAILED]

General support questions including new installations
Post Reply
russellw
Posts: 8
Joined: 2010/05/17 10:23:23
Location: Australia
Contact:

MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by russellw » 2017/02/18 01:31:42

Good morning

Since performing some package updates in an attempt to resolve another issue (which has gone away at least), I am now getting the captioned error.

Code: Select all

# tail /var/log/mysqld.log
170217 18:19:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170217 18:19:07  InnoDB: Initializing buffer pool, size = 8.0M
170217 18:19:07  InnoDB: Completed initialization of buffer pool
170217 18:19:07  InnoDB: Started; log sequence number 0 44233
170217 18:19:07 [ERROR] Aborting

170217 18:19:07  InnoDB: Starting shutdown...
170217 18:19:12  InnoDB: Shutdown completed; log sequence number 0 44233
170217 18:19:12 [Note]
170217 18:19:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
mysql_upgrade returns:

Code: Select all

# mysql upgrade
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
mySQL version is mysql 5.0.95-5.el5_9 running on Centos 5.11

I'm at something of a loss and any pointers would be appreciated.

Regards
Russ

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by TrevorH » 2017/02/18 02:47:50

So, what version were you running before the upgrade? Second, it's mysql_upgrade not mysql upgrade
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

russellw
Posts: 8
Joined: 2010/05/17 10:23:23
Location: Australia
Contact:

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by russellw » 2017/02/18 04:37:09

Thanks for the response.

Code: Select all

# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
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
Prior to the upgrade, we were running mysql 5.0.95-5.el5_9 and it went forward to mysql 5.4.45-11.el5_remi which caused a whole pile of other problems and which was removed (along with that repo being disabled) and the original reinstalled.

This is the same version that the (working) production server has with the only differences between them being that the production server runs php 5.3.29-4.w5 (no longer available) against the php-5.1.6-45.el5_11 that was installed on this box and the 5.4.45-11.el5.remi that this one is running after the upgrade.

I was tracking down a blank page issue for logged in users with the test server (that doesn't occur on the production one). The php version change did get rid of the blank page issue but the SQL upgrade caused the SQL error and even the roll back and reinstall hasn't resolved it. A Google search seems to indicate there is an issue with that remi distribution which is why in have disabled it.

At this stage I'm considering taking php back to the php-5.1.6-45.el5_11 version and working forward again.

Regards
Russ

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by TrevorH » 2017/02/18 12:42:46

Changing your php version will not affect your mysql problems so let's stick with just the one thing at a time.

Are you saying that you enabled remi's el5 repo and did a yum update and that gave you a higher version of mysql-server? I see in remi's el5 repo that it has mysql-server-5.5.54-3. Can you post the output from grep -i mysql /var/log/yum.log so that we can see what the sequence of package installations was please?

What I suspect at the moment is that you, perhaps accidentally, installed the newer mysql-server 5.5.54 and that it started up and made changes to your mysql database table structure. You then backleveled it to the CentOS supplied 5.0.95 and then had the problem that you are talking about. If that is the sequence of events then I suspect that you will now need to re-install the newer mysql-server - at least temporarily - then use it to perform a full backup of the database using mysqldump. Then you can uninstall the 5.5.54 version, delete and recreate the /var/lib/mysql directory and re-install the 5.0.95 package then start the server and restore your backup. Probably side to rename the old /var/lib/mysql rather than outright deleting it so that you can revert to it if you need to.

Whatever you do now, make sure you back everything up so that you can at least get back to where you are now. What I posted above is only a theory based on what you've said so far so could be wrong and thus the possible fix might not be applicable. Let's have a look at mentions of mysql in /var/log/yum.log so we can tell for sure the sequence of events.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

russellw
Posts: 8
Joined: 2010/05/17 10:23:23
Location: Australia
Contact:

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by russellw » 2017/02/18 20:11:13

I suspect you are right looking at the log.

Code: Select all

# grep -i mysql /var/log/yum.log
Feb 17 16:16:12 Erased: mysql-devel
Feb 17 16:16:14 Erased: mysql
Feb 17 16:34:04 Installed: mysqlclient15-5.0.91-1.jason.1.x86_64
Feb 17 16:34:04 Updated: mysql-5.1.58-jason.1.x86_64
Feb 17 16:34:05 Updated: mysql-server-5.1.58-jason.1.x86_64
Feb 17 16:34:13 Updated: mysql-devel-5.1.58-jason.1.x86_64
Feb 17 17:11:22 Updated: mysql-5.5.54-1.el5.remi.x86_64
Feb 17 17:11:22 Installed: mysql-libs-5.5.54-1.el5.remi.x86_64
Feb 17 17:11:22 Updated: mysql-devel-5.5.54-1.el5.remi.x86_64
Feb 17 17:11:23 Updated: mysql-server-5.5.54-1.el5.remi.x86_64
Feb 17 18:11:58 Installed: mysql-5.1.58-jason.1.x86_64
Feb 17 18:11:58 Installed: mysql-5.0.95-5.el5_9.i386
Feb 17 18:13:25 Installed: mysql-devel-5.1.58-jason.1.x86_64
Feb 17 18:13:25 Installed: mysql-devel-5.0.95-5.el5_9.i386
Feb 17 18:15:09 Installed: mysql-server-5.1.58-jason.1.x86_64
As this test server is supposed to become the new production server, it is backed up daily and it only has an old version of the database so I can restore the current production database to it at any point which sounds like it maybe should be the next step rather than going back to 5.5.54-1.

Cheers
Russ

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by TrevorH » 2017/02/18 20:53:48

Since CentOS 5 itself has only about 6 weeks of life left, whatever you're up to, won't last very long! Might be better to put resources into setting stuff up on CentOS 7 which has until 2024 before it goes EOL.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

russellw
Posts: 8
Joined: 2010/05/17 10:23:23
Location: Australia
Contact:

Re: MySQL Daemon failed to start. Starting mysqld: [FAILED]

Post by russellw » 2017/02/18 23:19:53

While that makes sense; the driver here is to get the current (new) test box operational as a replacement for the production box which is having disk related issues and which is almost 5 years old. That box will then get rebuilt as a Centos 7 upgrade test box given there are some limitations in what can be run with the portal and forum software we use.

Cheers
Russ

Post Reply