C连接mysql出现错误:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
来源:互联网 发布:java中的异常处理 编辑:程序博客网 时间:2024/05/16 10:31
1、先通过:service mysqld status 查看mysql是否启动
(没装mysql service 也可通过 /etc/rc.d/init.d/mysqld status查看)
若没启动,则启动mysql:service mysqld start
2、方法: 修改/etc/my.conf:
[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/usr/local/mysql
If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:
[client]
socket=/var/lib/mysql/mysql.sock
(注意:红色标记部分文件路径必须相同)
发现依旧如此,运行/etc/init.d/mysql start报错:Starting MySQLCouldn't find MySQL manager or server
是mysqld服务没启,运行/usr/local/mysql/bin/mysqld_safe &
- C连接mysql出现错误:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- C连接mysql出现错误:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- mysql启动Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ mysql.sock
- php连接mysql数据库Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock
- linux下mysql连接失败: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- MySQL连接报错:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- eoiioe Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) 问题解决
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
- iOS5 XCode4.2环境下iPhone3G和3GS调试问题解决方案
- varchar(8000)
- 创业公司该如何设计激励员工的期权池
- HDU 3589 Jacobi symbol 【二次剩余】
- 锁
- C连接mysql出现错误:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
- ie6,ie7下设置overflow:auto下滚动条不起作用
- hdu3584 Cube【三维树状数组】
- Oracle中Decode()函数使用技巧
- oracle的substr函数的用法
- hdu3590 PP and QQ 【ext_anti-nim】
- Hibernate
- 空气面具利用人类呼吸为iPhone充电
- WAS Base 7创建Server命令