码迷,mamicode.com
首页 > 数据库 > 详细

Can‘t connect to local MySQL server through socket

时间:2018-02-28 16:29:13      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:ERROR 2002(HY000)

# mysql

ERROR 2002(HY000):Can't connect to local MySQL server through socket '/tmp/mysql.socket'

# ln -s /usr/local/mysql/data/mysql.sock /tmp/mysql.sock



ERROR 1045 (28000):Access denied for user 'root'@'localhost' (using password: NO)

说明设置了mysql密码,需要# mysql -uroot -p'密码'

设置密码cd /usr/local/mysql/bin下 # ./mysqladmin -u root password '密码'

Can‘t connect to local MySQL server through socket

标签:ERROR 2002(HY000)

原文地址:http://blog.51cto.com/sf1314/2073949

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!