您的位置:首页 > 运维架构 > Linux

阿里云环境Centos下安装MySql遇到的问题记录.

2014-07-07 23:14 921 查看
晚上在阿里云Centos下安装MySql.使用yum和官网上下载rpm文件都出现.command not find.搜索了下发现了是只安装了MySql-Serve.没有安装MySql-client.安装client后,command not found 提示不在出现.而是出现Can't
connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2).

解决方案参照 http://stackoverflow.com/questions/21103197/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock

Here's what helped me solve this problem, which was that the actual file directory on my server was/var/lib/mysql/mysql.sock, not /var/lib/mysqld/mysqld.sock:

Open your my.cnf file

Add the following to your 
[client]
 section
(if you don't have a 
[client]
 section,
then add it). It should look like this:

[client]

socket=/var/lib/mysql/mysql.sock
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: