Encountered a Linux system boot cannot find the Mysql.sock problem
Cause Analysis:
Because the data is large, the storage large file of MySQL is stored directly under the root directory file, causing the Mysql.sock file under Tem to be deleted, so it can't connect to MySQL.
Solution:
1. Stop the MySQL service
Service mysqld stop;
2. Move large files to a directory with larger remaining space
MV Mysql_data/xxx
3. Make a soft connection to the Mysql_data folder
Ln-s/home/xxx/mysql_data
Command parsing: Make a soft connection to the/mysql_data at the post-move XXX location (personal understanding of Windows-like shortcuts)
4. Restart the MySQL service
Service mysqld Restart
The command to use:
View MySQL Import data path
After logging in to MySQL:
Show variables like '%dir% ';
Results:
, DataDir is the path where the data is imported.
If you do not need to make a soft connection mysql.cnf to make changes,
MySQL connection in Linux could not find the Mysql.sock file