Fedora8 mysql startup error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock' (2)
1. Check/etc/rc. d/init. d/mysqld status to see if m y s q l has been started.
Check whether the permission is correct.
2. Check whether your mysql. sock is in that location,
Mysql-u your mysql username-p-S/var/lib/mysql. sock
3. Try: service mysqld start
4. If the permission problem occurs, change the permission first # chown-R mysql: mysql/var/lib/mysql
[Root @ localhost ~] #/Etc/init. d/mysqld start
Start MySQL: [OK]
[Root @ localhost ~] # Mysql-uroot-p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock' (2)
The reason is that the access permission of/var/lib/mysql is incorrect.
Shell> chown-R mysql: mysql/var/lib/mysql
Start the server.
Shell>/etc/init. d/mysql start
After the server is started normally, check/var/lib/mysql to automatically generate the mysql. sock file.
However, my problem is still not solved.
The problem is finally solved:
Method: Modify/etc/my. conf:
[Mysqld]
Datadir =/usr/local/mysql/data
Socket =/var/lib/mysql. sock
[Mysql. server]
User = mysql
Basedir =/usr/local/mysql
If there is not currently a section called [client], add one at the bottom of the file and copy the socket = line under the [mysqld] section such:
[Client]
Socket =/var/lib/mysql. sock
The error "Starting MySQLCouldn't find mysql manager or server" is returned when you run/etc/init. d/MySQL start.
If the mysqld service is not enabled, run/usr/local/mysql/bin/mysqld_safe &
Solve the problem.
Author 252831020