当前位置:Gxlcms > 数据库问题 > mysql 不能登录

mysql 不能登录

时间:2021-07-01 10:21:17 帮助过:1人阅读

[root@localhost ~]# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (111)

解决方案:

[root@localhost ~]# service mysql start    ###重启数据库
Starting MySQL                                             [  OK  ]
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.32-log Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.


mysql 不能登录

标签:

人气教程排行