socket '/var/run/mysqld/mysqld.sock' (2) -[solved] mysql
background
yesterday morning i noticed my website was down.
when i rebooted the system and tried to log into mysql i would get the following error
socket '/var/run/mysqld/mysqld.sock' (2)
i just set up linode about 2 weeks ago and i used the default installation. it turns out that the default installation only allocates 3GB of diskspace and all my diskspace was full… why was it full??
well i also setup load balancing. the loadbalancer would touch each one of my websites on my nodes every 10 seconds. since i'm running joomla on each node--joomla hits the mysql database every time and the /etc/mysql/my.cnf had general_log = 1 which would log the text of each query run to /var/log/mysql/mysql.log.
after a few days of this and logging out reams and reams of data per day..the short story is that my diskspace became full and I had these HUGE logfiles. mysql wouldn't start up i guess because it didn't have any diskspace to write to…
solution:
1. delete the log files in /var/log/mysql/ the system would archive the old logfiles and put them in .gz format
2. turn off query logging. by editing /etc/mysql/my.cnf and settign general_log = 0
3. (optional) shut down your linode and increase the disk allocation to a larger size…
by Linodes »
Set New Size to a larger number.
4. restart mysql using: service mysql restart
i hope this helps someone save some time