重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2765|回复: 0
打印 上一主题 下一主题

[安装] ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/...

[复制链接]
跳转到指定楼层
楼主
发表于 2018-7-5 16:33:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

操作系统:RHEL7.3  64
mySQL版本:mysql-5.6.40

报错如下:
[root@strong ~]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to localMySQL server through socket '/var/lib/mysql/mysql.sock' (2)

解决办法:
[root@strong ~]# service mysql start
Starting MySQL. SUCCESS!
[root@strong ~]# ps -A | grep -i mysql
7349 pts/3    00:00:00 mysqld_safe
7446 pts/3    00:00:00 mysqld
[root@strong ~]# kill -9 7349
[root@strong ~]# kill -9 7446
[root@strong ~]# /etc/init.d/mysql restart
ERROR! MySQL server process #7446 is not running!
Starting MySQL. SUCCESS!
[root@strong~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.40

Copyright (c) 2000, 2018, 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>







分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 15:34 , Processed in 0.110492 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表