ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
2023-09-14 09:05:44 时间
解决方法:
由于mysql 默认的mysql.sock 是在/var/lib/mysql/mysql.sock,但linux系统总是去/tmp/mysql.sock查找,所以会报错
[root@localhost ~]# find / -name mysql.sock
/var/lib/mysql/mysql.sock
直接指定mysql通道
[root@localhost ~]# mysql --socket=/var/lib/mysql/mysql.sock
相关文章
- 使用navicat premium将数据库从Oracle迁移到SQL Server,或从Oracle迁移到MySQL
- Mysql:is not allowed to connect to this MySQL server
- 【MySQL】数据库字符校对规则
- 从SQL Server到MySQL,携程核心系统无感迁移实战
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- centos用yum安装mysql-server
- spring boot:shardingsphere+druid+mysql主从复制的读写分离(分库分表)(spring boot 2.3.4)
- 【原创】MySQL Proxy - connect_server()
- Server-U FTP与Mysql数据库集成
- MySQL内核月报 2014.12-MySQL· 优化改进· GTID启动优化
- mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法
- Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/mysql.pid).
- Java实现获得MySQL数据库中所有表的记录总数可行方法
- mysql server 自动断开的问题
- tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket
- MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法
- Mysql中的sum()与group by
- Mycat启动正常但无法连接ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql
- MySQL_11_ShardingJDBC实现分库分表
- [MySQL] 解决办法: Error: Transaction test error: file /etc/my.cnf from install of mysql-community-server