Today, the community milestone version of MySQL5.5 is installed. in order, I first uninstalled the previous version 5.0, and then installed the servers and clients (rpm version) respectively ). When executing mysql commands, the system always prompts: Cantconnecttolocalmysqlserverthroughsocketvarlibmysqlmysql. sock. Me score
Today, I installed MySQL 5.5 community milestone edition. in order, I first uninstalled the previous version 5.0, and then installed the servers and clients (rpm version) respectively ). When executing mysql commands, the system always prompts: "Can't connect to local mysql server through socket '/var/lib/mysql. sock '. Me score
Today, I installed MySQL 5.5 community milestone edition. in order, I first uninstalled the previous version 5.0, and then installed the servers and clients (rpm version) respectively ).
When executing mysql commands, the system always prompts: "Can't connect to local mysql server through socket '/var/lib/mysql. sock '.
I found this method on google, but it doesn't work either. I tried this method, and then I tried N different methods, I even manually wrote my in the/etc/directory. cnf file (the configuration file manually written will not help but mislead mysql service startup, and the problem will be solved after it is deleted )......
Here, I finally solved my problem through a more violent method. The record is as follows:
1. Use ps-aux | grep mysql to find the mysql-related process pid.
2. Run the kill command to conclude mysql-related processes.
3. start service mysql-start.
Finally, enter the mysql command, and the "Welcome to the MySQL monitor. Commands end with; or/g.
Your MySQL connection id is 1
Server version: 5.5.0-m2-community for MySQL Community Server (GPL )"
Several key points in the problem search process:
1. First, find the mysql. sock file (find/-name mysql. sock) mentioned in the error prompt and find that it cannot be found (this file is special ).
2. If the file cannot be found, you need to restart the mysql service (service mysql restart ).
3. But restarting the service depends on mysql. sock. This is an endless loop. What should I do?
4. Use brute force kill to kill mysql-related processes.