Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1、kill掉列出的进程:
[root@localhost mysql]# ps -a | grep -i mysql
pts/ :: mysqld_safe
pts/ :: mysqld <defunct>
[root@localhost mysql]# kill -
[root@localhost mysql]# kill -
2、重启启动mysql
[root@localhost mysql]# service mysql start
Starting MySQL.. [确定]
[root@localhost mysql]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6.-log MySQL Community Server (GPL) Copyright (c) , , 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>
Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)的更多相关文章
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
从供应商手中接手一个云平台(Windwos Azure)上的MySQL数据库,登录数据库时遇到错误: $mysql -uroot -p Enter password: ERROR 2002 (HY00 ...
- 更换mysql数据目录后出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解决办法
服务器上的mysql默认数据目录为/var/lib/mysql/,同时服务器的/空间不是很大,而近期又有大量的日志需要导入进行分析,时常搞得/的空间捉襟见肘,晚上一狠心就想把mysql的数据目录转移到 ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql/mysql.sock' (2)
[root@XXX ~]# mysql -h localhost -uroot -p Enter password: ERROR (HY000): Can't connect to local MyS ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解决办法
更换mysql数据目录后出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
登录服务器,使用root用户连接mysql时出现错误提示: $ bin/mysql -uroot -p Enter password: ERROR (HY000): Can't connect to ...
- 更换mysql数据目录后出现 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解决办法
服务器上的mysql默认数据目录为/var/lib/mysql/,同时服务器的/空间不是很大,而近期又有大量的日志需要导入进行分析,时常搞得/的空间捉襟见肘,晚上一狠心就想把mysql的数据目录转移到 ...
- 长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to lo ...
- 解决:error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
在使用 deamon@deamon-H55M-S2:/usr/bin$ mysqladmin -u root -p shutdown 关闭MySQL之后试图通过: deamon@deamon-H55M ...
- MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ( ...
随机推荐
- 《深入Java虚拟机学习笔记》- 第7章 类型的生命周期/对象在JVM中的生命周期
一.类型生命周期的开始 如图所示 初始化时机 所有Java虚拟机实现必须在每个类或接口首次主动使用时初始化: 以下几种情形符合主动使用的要求: 当创建某个类的新实例时(或者通过在字节码中执行new指令 ...
- Python脚本控制的WebDriver 常用操作 <十八> 获取测试对象的css属性
测试用例场景 当你的测试用例纠结细枝末节的时候,你就需要通过判断元素的css属性来验证你的操作是否达到了预期的效果.比如你可以通过判断页面上的标题字号以字体来验证页面的显示是否符合预期.当然,这个是强 ...
- NOIP2012 国王游戏
2国王游戏 (game.cpp/c/pas) [问题描述] 恰逢 H 国国庆,国王邀请 n 位大臣来玩一个有奖游戏.首先,他让每个大臣在左.右手上面分别写下一个整数,国王自己也在左.右手上各写一个整数 ...
- sql-定义变量
declare @subject nvarchar(50) set @subject=(select Subject from dbo.Scores where ID=1) --select @sub ...
- Hello,Ubuntu(安装过程中遇到的问题及解决)
2013-02-23 不折腾不舒服(>_<).在虚拟机上运行Ubuntu程序一多就明显卡顿,感觉效率不高.为了流畅使用Ubuntu,也便于将来学习Vim/Emacs,我决定在笔记本的Win ...
- HDU2296——Ring(AC自动机+DP)
题意:输入N代表字符串长度,输入M代表喜欢的词语的个数,接下来是M个词语,然后是M个词语每个的价值.求字符串的最大价值.每个单词的价值就是单价*出现次数.单词可以重叠.如果不止一个答案,选择字典序最小 ...
- Spark生态
- hdoj 2051 Bitset
Bitset Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Subm ...
- [OC Foundation框架 - 6] NSMutableString
NSString是不可变的 NSMutableString是可变字符串 1.初始化 2.串联字符串 3.替换字符串 4.插入字符串 5.删除字符串 #pragma mark buffer st ...
- 转载 DNS查询流程简介
转载请注明出处:http://blog.csdn.net/luotuo44/article/details/45545059 DNS(domain name system),读者们或多或少都听过,就是 ...