mysql was running... however, var/run/mysqld directory was empty.
I originally did... ps -ef | grep mysql
at the moment, it is working and down below I listed the steps I took for it to work. I do want to find out why this happened though. It is just strange.
right now...
Quote:
ps -ef | grep mysql
mysql 5779 1 1 18:56 ? 00:01:09 /usr/sbin/mysqld
root 26663 2231 0 20:08 pts/0 00:00:00 grep --color=auto mysql
Quote:
ps aux | grep mysqld
mysql 5779 1.6 3.3 114476 34376 ? Ssl 18:56 1:09 /usr/sbin/mysqld
root 26661 0.0 0.0 3376 752 pts/0 S+ 20:08 0:00 grep --color=auto mysqld
I found this similar problem on thread
http://forums.mysql.com/read.php?11,9689,9689#msg-9689the info I found on the were outdated from 2004 through 2009. They were also for other distros, only a few for ubuntu.
I couldnt connect at all. It was really weird.
Most believe it was permission issue, and majority of the thread was mentioning to change permissions etc.
then I saw this thread to killall
Quote:
killall mysqlmanager AND/OR
kill any mysql process AND/OR
kill process ID (cat /var/run/mysqld/mysqld.pid, cat /var/run/mysqld/mysqlmanager.angel.pid, cat /var/run/mysqld/mysqlmanager.pid)
no socket (/var/lib/mysql/)
/etc/init.d/mysqld start
mysql -u root -p
so, I checked the error log, syslog, auth.log, mysql log, and something caught my eye on mysql log.
Quote:
Disk is full writing '/var/lib/mysql/dbname/db_yarpp_related_cache.MYI' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
110813 5:14:17 [ERROR] /usr/sbin/mysqld: Retry in 60 secs. Message reprinted in 600 secs
110813 5:24:17 [ERROR] /usr/sbin/mysqld: Retry in 60 secs. Message reprinted in 600 secs
since I couldnt use mysql at all. I couldnt even login from the terminal. If I tried mysql -u root -p I would just get the error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I decided to remove it all the way.
apt-get remove mysql-*
Then, installed mysql again. I was able to mysql -u root -p
recreated the database and the user.
mysql> create database dbname;
ERROR 1007 (HY000): Can't create database 'dbname'; database exists
mysql> grant all on dbname.* to 'user' identified by 'pass';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
Nothing.
reinstall
apt-get install php5-mysql
Nothing. Still have 500 error
I removed cache plugin.
rm -r w3tc
It worked.
I got it working now.
then, install phpmyadmin, and checked tables.
it didnt show anything about db_yarpp_related_cache.MYI table; however showed another table being corrupted.
repaired the tables.
It seems ok now. however, I still would like to figure out why this happened. I dont think table corruption would disconnect mysql and make it not work.
?