1

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
Gio Borje
  • 149
  • 3
  • 10

2 Answers2

1

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

Arenstar
  • 3,602
  • 2
  • 25
  • 34
0

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.

Ben Jencks
  • 1,361
  • 8
  • 13