Start mysql error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
ps aux | grep mysql
kill processes listed
systemctl start mariadb
My problem is solved
----------------------------------------------
Fedora8 start mysql error:
ERROR 2002 (HY000): of Can not Connect to local MySQL Server through socket '/var/lib/mysql/mysql.sock' (2)
1, first check /etc/rc.d/init.d / mysqld status to see if mysql has been launched.
Also see if it is a permissions problem.
2. determine your mysql.sock are not in that position,
mysql mysql -u your username -p -S / var / lib / mysql /mysql.sock
. 3, try: Start-Service mysqld
. 4, if authority, permission to change the first MySQL -R & lt #chown: MySQL / var / lib / MySQL
[the root @ localhost ~] # /etc/init.d/ mysqld start
start MySQL: [OK]
[root @ localhost ~] # MySQL-uroot--p
ERROR 2002 (HY000): of Can not Connect to local MySQL Server through socket '/var/lib/mysql/mysql.sock' (2 )
the reason is that access issues / var / lib / mysql's.
shell> chown -R mysql: mysql / var / lib / mysql
then start the server
shell> /etc/init.d/mysql start
the server starts the normal viewing / var / lib / mysql mysql.sock automatically generated file.
But my question remains unresolved.
Finally solved the problem:
Method: Review /etc/my.conf:
[mysqld]
DATADIR = / usr / local / MySQL / Data
Socket = / var / lib / MySQL / mysql.sock
[the mysql.server]
User = MySQL
the basedir = / usr / local / mysql