After the MySQL dataDir directory is migrated, the error prompts “can’t connect to local MySQL server through socket ‘/ var/lib/MySQL”/ mysql.sock ‘
solve:
Open my.cnf The changes are as follows:
[client]
port = 3306
socket = /new/mysql/ mysql.sock
[mysqld]
datadir=/new/mysql
socket=/new/mysql/ mysql.sock
Read More:
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- mac brew install mysql ‘/tmp/mysql.sock’ (2) [How to Solve]
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- MySQL Install Error: MySQL error 1042: Unable to connect to any of the specified MySQL hosts
- [Solved] CentOS installs MySQL and starts MySQL with error 2002 (HY000)
- Ubuntu ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (111)
- [Solved] MYSQL Error: ERROR! MySQL server PID file could not be found!
- How to Solve c3p0 connect mysql8.0 Error
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per