I am having a big problem trying to connect to mysql. When I run:
/usr/local/mysql/bin/mysql start
I have the following error :
<
If you are using AWS (Amazon Web Services) Micro version, then it is a memory issue. When I ran
mysql
from the terminal it would say
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock' (111)
So I tried the following and it would just fail.
service mysqld restart
After much searching, I found out that you have to create a swap file for MySQL to have enough memory. Instructions are listed: http://www.prowebdev.us/2012/05/amazon-ec2-linux-micro-swap-space.html.
Then, I was able to restart mysqld.