mariadb同样适用
首先检查mysql状态
linux-6yo1:~ # /etc/init.d/mysql status Checking for service MySQL: unused mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: inactive (dead) CGroup: name=systemd:/system/mysql.service Jul 17 15:28:28 linux-6yo1.site systemd[1]: Stopped LSB: Start the MySQL dat.... Jul 17 15:30:38 linux-6yo1.site systemd[1]: Stopped LSB: Start the MySQL dat....
发现Active: inactive (dead)
重启mysql.
linux-6yo1:~ # /etc/init.d/mysql restart
redirecting to systemctl restart mysql
再次查看mysql状态
linux-6yo1:~ # ps aux | grep mysql
root 5227 0.5 0.1 3204 1320 ? S 15:39 0:00 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/var/lib/mysql
mysql 5575 2.2 4.6 472456 47808 ? Sl 15:39 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --port=3306root 5609 0.0 0.0 2756 772 pts/2 S+ 15:39 0:00 grep --color=auto mysql
linux-6yo1:~ # /etc/init.d/mysql status
Checking for service MySQL: runningmysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since Wed, 2013-07-17 15:39:11 CST; 29s ago Process: 5100 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/mysql.service ├ 5227 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --use... └ 5575 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib...Jul 17 15:39:06 linux-6yo1.site mysql[5100]: Please report any problems with...!Jul 17 15:39:06 linux-6yo1.site mysql[5100]: The latest information about Ma....Jul 17 15:39:06 linux-6yo1.site mysql[5100]: You can find additional informa...:Jul 17 15:39:06 linux-6yo1.site mysql[5100]: http://dev.mysql.comJul 17 15:39:06 linux-6yo1.site mysql[5100]: Support MariaDB development by ...mJul 17 15:39:06 linux-6yo1.site mysql[5100]: Monty Program Ab. You can conta....Jul 17 15:39:06 linux-6yo1.site mysql[5100]: Alternatively consider joining ...:Jul 17 15:39:06 linux-6yo1.site mysql[5100]: http://kb.askmonty.org/en/contr.../Jul 17 15:39:11 linux-6yo1.site mysql[5100]: Starting service MySQL ..doneJul 17 15:39:11 linux-6yo1.site systemd[1]: Started LSB: Start the MySQL dat....
相关推荐
在MySQL服务器的运行过程中,可能会遇到“ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'”这样的错误。这个错误提示表明,客户端试图通过Unix域套接字(socket文件)...
在安装好了MySQL之后,使用了新的配置文件后,MySQL服务器可以成功启动,但在登陆的时候出现了ERROR 2002 (HY000): Can’t connect to local MySQL server through socket,即无法通过socket连接到mysql服务器,同时...
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) 的异常。是用dmg直接安装的以为安装包又出现了奇奇怪怪的错误,正欲卸载该版本时找到了我的问题的关键。 解决...
在使用MySQL时,可能会遇到一个常见的错误:“ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’”。这个错误表明客户端无法通过Unix套接字文件与本地MySQL服务器建立...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
让人纠结了一把…… 代码如下:zhouqian@zhou:~$ mysqlERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)网上好多的解决办法,可是每个人的实际情况...
ERROR 2002: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (111) 解决办法: /usr/local/mysql/bin/mysqladmin -u root > -S /var/lib/mysql/mysql.sock password 'your.passwd' ...
MySQL数据库是我们日常运维工作中经常会使用的一个重要组件,它在运行过程中可能会出现各种问题,而错误ERROR 2002 (HY000): Can't connect to local MySQL server through socket是一个比较常见的连接失败错误。...
在本文中,我们将深入探讨如何有效解决“ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (111)”这个错误,它通常发生在尝试连接到本地MySQL服务器时失败的情况。 首先,这个错误代码...
?php $link=mysql_connect(‘localhost’,’root’,... 运行后报错 Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ 但在 命令行中能进入mysql [root@localhost local]# mysql -u root -p E
在MySQL的使用过程中,有时会遇到异常错误"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"。这个错误通常表示客户端无法通过套接字文件与MySQL服务器...
在启动MYSQL时出现问题:“ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)”,情况如图: 二、问题分析 从错误的提示中可以看出MySQL服务没有启动,因此只需要启动MySQL服务就可以...
ERROR 1130 (HY000): Host ‘localhost’ is not allowed to connect to this MySQL server www.jb51.net 出现原因: mysql只有一个root用户,修改root密码后选了MD5,提交后,重新 登陆出现“Host ‘localhost’ is...
然而,这个过程中可能会遇到各种问题,其中最常见的一种错误就是“ERROR 2003 (HY000): Can't connect to MySQL server on 'IP地址' (111)”。这篇文章将深入探讨这个问题的原因,并提供解决方案。 首先,当尝试...
当通过 TCP/IP 连接 MySQL 远程主机时,出现 ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet’, system error: 104 。 如果是在linux shell命令行中直接打 mysql ...
标题中的问题“MySQL无法连接到本地MySQL服务器”通常是由多种因素引起的,这可能是由于服务未启动、配置问题、权限问题或者是网络通信问题等。描述提到的情况指出,即使卸载并重新安装MySQL,问题仍然存在,这表明...
error 日志当中的记录: [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist 从发了帖子,只有人看,没有人回复,看到这种情况只能自己解决问题了,自己动手...
最近在linux上装Aphace... can't connect to local MySQL server through socket 'var/run/mysqld/mysqld.sock' 这个把我弄得几近崩溃,我在网上查找了很多的解决办法,大概有几种解决方案: 1.权限问题 2.修改/
服务器:unbuntu16.04,阿里云 起因:运行了快三年的系统...ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' 怎么办呢,看看这个啥文件先,然而查到是这个文
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'(2) ``` 解决方法是使用以下命令: ``` sudo chown -R _mysql:mysql /usr/local/var/mysql ``` 然后启动 MySql 服务: `...