【error】: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
2016-04-12 19:35
811 查看
错误描述如下:
出现此问题一般是
查看mysql服务是否进行:
如果在运行的话就杀掉进程
重启服务:
sudo service mysql start
或:
注意:其他解决方法参考Reference
http://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run
http://stackoverflow.com/questions/19658891/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run
http://ubuntuforums.org/showthread.php?t=804021&page=1
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
出现此问题一般是
mysqlserver服务没有启动的缘故,当然导致没有启动的原因有很多,比如我在树莓派上遇到的就是内存不足,怎么 都无法启动服务。
查看mysql服务是否进行:
ps -aux | grep mysqld
如果在运行的话就杀掉进程
sudo kill [pid]
重启服务:
sudo service mysql start
或:
sudo service mysqld start
注意:其他解决方法参考Reference
Reference
http://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqhttp://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run
http://stackoverflow.com/questions/19658891/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run
http://ubuntuforums.org/showthread.php?t=804021&page=1
相关文章推荐
- MySQL数据类型
- mysql的loaddatainfile的用法
- jsp和exclipse还有myexclipse+mysql+sqlserver
- mysql语句优化对比
- 使用CMD命令行来对MySQL数据库执行迁移、备份、恢复
- 《MySQL必知必会学习笔记》:触发器
- mysql-关系型数据库基础理论(04)
- 在Jena框架下基于MySQL数据库实现本体的存取操作
- 高性能MySQL笔记-第5章Indexing for High Performance-005聚集索引
- mysql replication /mysql 主从复制原理
- 【mysql】的基本使用
- MySQL分库分表--全局ID生成方案
- mysql 修改字段值等于另一字段值或另一字段值的拼接
- MySQL 存储过程 递归 获取所有子节点
- MySQL基础四:表的删除、插入、更新、查找
- mysql事务的默认隔离级别
- MYSQL性能优化--不停机分表,修改mysql表结构
- MAC 环境下 初始化新的mysql root 密码
- Mysql 日志文件类型
- MySQL数据类型的验证