Can‘t connect to local MySQL server through socket
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Can‘t connect to local MySQL server through socket相关的知识,希望对你有一定的参考价值。
# 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的主要内容,如果未能解决你的问题,请参考以下文章
mariadb报:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/my
/var/lib/mysql 的访问权限问题 Can't connect to local MySQL server through socket '/var/lib/mysql/my
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/tmp
Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 解决
MySQL报错的解决Can‘t connect to local MySQL server through socket ‘varlibmysqlmysql.soc
连接Mysql提示Can’t connect to local MySQL server through socket的解决方法