Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just updated my MySQL on CentOS when I did yum update. My website threw some MySQL errors and I found out that MySQL wasn't running:

# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting MySQL:  [FAILED]

I receive this error:

2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect

The file doesn't exist and it isn't in my /tmp folder either.


MySQL Upgrade error:

# 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 try
ing to connect
FATAL ERROR: Upgrade failed

MySQL Error log:

101107 12:52:28 [Warning] /usr/libexec/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
101107 12:52:28 [Note] Plugin 'ndbcluster' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
101107 12:52:28 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101107 12:52:28  InnoDB: Started; log sequence number 0 30688749
101107 12:52:28 [ERROR] /usr/libexec/mysqld: unknown option '--skip-bdb'
101107 12:52:28 [ERROR] Aborting

101107 12:52:28  InnoDB: Starting shutdown...
101107 12:52:34  InnoDB: Shutdown completed; log sequence number 0 30688749
101107 12:52:34 [Note] /usr/libexec/mysqld: Shutdown complete

101107 12:52:34 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

2nd time:

101107 12:52:34 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
101107 13:19:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101107 13:19:44 [Warning] option 'innodb-additional-mem-pool-size': signed value 204800 adjusted to 524288
101107 13:19:44 [Warning] option 'innodb-log-buffer-size': signed value 204800 adjusted to 262144
101107 13:19:44 [Note] Plugin 'ndbcluster' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
101107 13:19:44 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101107 13:19:44  InnoDB: Started; log sequence number 0 30688749
101107 13:19:44 [ERROR] /usr/libexec/mysqld: unknown option '--skip-bdb'
101107 13:19:44 [ERROR] Aborting

101107 13:19:44  InnoDB: Starting shutdown...
101107 13:19:49  InnoDB: Shutdown completed; log sequence number 0 30688749
101107 13:19:49 [Note] /usr/libexec/mysqld: Shutdown complete

101107 13:19:49 mysqld_safe mysqld from pid file /var/lib/mysql/dev.system.de.pid ended

These are the most recent errors that I've logged.


$ mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
FATAL ERROR: Upgrade failed
share|improve this question

2 Answers 2

up vote 1 down vote accepted

Firstly in your my.cnf

remove '--skip-bdb'

Try to start it again /etc/init.d/mysqld start

it also seems like you have upgraded to a newer version 5.1 so you will need to run mysql_upgrade once the server is running

share|improve this answer
    
Sorry, all I know is that I ran "yum update" and the whole thing fell apart. I checked my.cnf and the directories are still correct. I can still run "mysql" but I receive the 2002 error. How would I do the mysql upgrade binary? –  Gio Borje Nov 7 '10 at 21:07
    
Ok we really need to see the logs... run something like this /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/dev.system.de.pid –  Arenstar Nov 7 '10 at 21:18
    
Added the logs to my original post –  Gio Borje Nov 7 '10 at 21:22
    
Well my website is back up but I still can't run "mysql_upgrade". I posted the new output at the end of my post. –  Gio Borje Nov 7 '10 at 21:41
1  
try mysql_upgrade -p and put your root mysql password in... Your not really reading these logs are you??? :P –  Arenstar Nov 7 '10 at 21:48

Look in my.cnf (either /etc/mysql/my.conf or /etc/my.cnf) for the log_error directive to find out where it's logging errors. On Ubuntu it defaults to /var/log/mysql/error.log, it might be different on your system. Look there to see what the mysql server is complaining about.

share|improve this answer
    
Added the error log to my original post –  Gio Borje Nov 7 '10 at 21:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.