Whenever I try and run mysql I get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I did some research and it looks to be cause the file mysqld.sock doesn't exist. I did a
ps -elf | grep mysql
and could not find mysql running. I then did
service mysql start
and it just froze (never started) I eventually ^C out of it and did
service mysql status
and it said that mysql is running, but when I run
ps -elf | grep mysql
it again shows nothing. I then stop the mysql service and again it hangsup so I used ^C to stop that and when I check the status it properly shows the status as stopped. I am so awkwardly lost and don't know where to go from here. The following is the latest from my error log file:
111227 18:07:42 [ERROR] /usr/sbin/mysqld: Can't open file: './wordpress/wp_7_rg_form_view.frm' (errno: 24) 111227 21:37:43 [Note] /usr/sbin/mysqld: Normal shutdown 111227 21:37:43 [Note] Event Scheduler: Purging the queue. 0 events 111227 21:37:45 InnoDB: Starting shutdown... 111227 21:37:48 InnoDB: Shutdown completed; log sequence number 0 4272160105 111227 21:37:48 [Note] /usr/sbin/mysqld: Shutdown complete 111227 21:40:33 [Note] Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 111227 21:40:33 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 111227 21:40:33 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation.
The following is (part of) my my.cnf file:
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] transaction-isolation=READ-COMMITTED user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /storageContainer/mysql tmpdir = /tmp
Let me know if you need more info... We would theoretically need to get mysql back up and running without losing anydata ...
Side note: I also checked and we only have 1 instance of the mysql-server.