Can’t connect to local MySQL server through socket 解决办法
来源:互联网 发布:js调用另一个js的函数 编辑:程序博客网 时间:2024/05/21 09:45
Can’t connect to local MySQL server through socket 解决办法
启动mysql 报错:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.
另外看看是不是权限问题.
2、确定你的mysql.sock是不是在那个位置,
mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock
3、试试:service mysqld start
4、如果是权限问题,则先改变权限 #chown -R mysql:mysql /var/lib/mysql
[root@localhost ~]# /etc/init.d/mysqld start
启动 MySQL: [ 确定 ]
[root@localhost ~]# mysql -uroot -p
0 0
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can’t connect to local MySQL server through socket 解决办法
- Can't connect to local MySQL server through socket 问题解决
- 解决:Can't connect to local MySQL server through socket
- Can't connect to local MySQL server through socket
- 解决问题Can’t connect to local MySQL server through socket
- Can't connect to local MySQL server through socket 问题解决
- Can't connect to local MySQL server through socket 问题解决
- 自定义拦截器
- 服务器配置git
- 关于Form表单提交中文乱码问题
- 第十章:Java_IO流
- enginx之于分布式部署的创新意义:服务器的服务器,通用分布式服务器引擎,集群引擎-使任何服务器程序纳入统一生态
- Can’t connect to local MySQL server through socket 解决办法
- (45). Spring Boot MyBatis连接Mysql数据库【从零开始学Spring Boot】
- SparkMlib实现线性回归
- 小知识积累(2)
- 外部存储属性extern
- Android OkHttp 框架学习
- Intent的简单介绍
- k近邻 - 手写数字识别
- 除去ScrollVIew ListView Viewpager拉到尽头时再拉的阴影效果