Shufflepants
0
Q:

can't connect to local mysql server through socket

# this saved my ass
# first  you must perform a graceful shutdown of the server from the command line rather than powering off the server
shutdown -h now

# an additional method for getting it back up again when you run into this problem is to move mysql.sock

# to centos
mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# to ubuntu
mv /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.sock.bak

# restart mysql
service mysqld start
1
# Start your mysql server
/etc/init.d/mysql start
0
service mysql start
0
Solution #1: Check If MySQL Service is Runnning.
Solution #2: Connect with 127.0. 0.1.
Solution #3: Modify the my. cnf file.
Solution #4: Verify mysql. sock Location.
Solution #5: Change MySQL Folder Permission.
Solution #6: Multiple MySQL Instances.
1
#/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
0

New to Communities?

Join the community