解决问题Can’t connect to local MySQL server through socket
来源:互联网 发布:网页版 行情软件 编辑:程序博客网 时间:2024/04/29 10:39
摘自http://blog.yousri.org/2009/02/23/mysql-error-2002-mysqlsock.html
不幸遇到Mysql出现ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误导致无法启动。
解决方法: 修改/etc/my.conf:
这样mysqld 及mysql就都可以搞定启动起来。
不过问题也就来了,php程序链接数据库的时候同样还是会出现这个问题,因为这还需要修改/etc/php.ini的php配置文件中的mysql.default_socket的值,其默认的时候是为空的,将其修改设置为:
但是有时这样并未能搞定php链接数据库的出现的Can’t connect to local MySQL server through socket '/tmp/mysql.sock’ (2) 的问题,因为php程序很BT的貌似非得找链接/tmp/mysql.sock而这个文件是不存在的,好吧,那就给他做个链接操作不就得了
这样php程序页面就可以链接到数据库了。
- 解决问题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
- 蓝蓝的天空
- Apache自带的性能测试工具ab的使用
- 解决 SAP IDES R3 471 收藏夹乱码问题
- 8
- 中文转拼音缩写 c#
- 解决问题Can’t connect to local MySQL server through socket
- 如何做一个标记为安全的ACTIVEX控件
- JFreeChart开发各种图表
- Oracle database link and synonym
- JSP中URL中文乱码问题!get提交时,服务器端乱码,url带中文参数乱码 [2]
- Oracle PL/SQL管理LDAP服务器(DBMS_LDAP包的使用)
- test
- 无线基础知识-详细
- Mysql数据备份以及异地存储