阅读851 返回首页    go 搜狐


Linux独享服务器MySQL数据库无法登陆处理方法

您在使用Linux独享服务器时,可能会遇到由于服务器MySQL负载高或调试、误操作而导致的数据库无法登陆问题,那么我们现在简单介绍下MySQL数据库无法登陆的处理方法。

首先使用CRT远程登陆服务器,使用以下两行命令:

例如MySQL进程查询返回信息:

Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.3/FAQ
root 10165 0.0 0.1 4804 1144 ? S 17:08 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe –user=mysql
mysql 10196 0.0 1.0 50948 11308 ? S 17:08 0:00 /usr/local/mysql/libexec/mysqld –basedir=/usr/local/mysql –datadir=/usr/local/mysql/var –user=mysql –pid-file=/usr/local/mysql/var/ud.pid –skip-external-locking –port=3306 –socket=/tmp/mysql.sock
root 10197 0.0 1.0 50948 11308 ? S 17:08 0:00 /usr/local/mysql/libexec/mysqld –basedir=/usr/local/mysql –datadir=/usr/local/mysql/var –user=mysql –pid-file=/usr/local/mysql/var/ud.pid –skip-external-locking –port=3306 –socket=/tmp/mysql.sock

1、[root@ud~]# kill -9 `ps ax|grep mysqld |awk ‘{print $1}’`(杀掉MySQL进程)

2、[root@ud~]# /usr/local/mysql/bin/mysqld_safe –user=mysql &(重新启动MySQL服务)

希望以上的方法能给予您在Linux独享服务器使用中的方便。

最后更新:2017-01-04 22:34:48

  上一篇:go 中电云集|linux vps|kloxo控制面板安装教程
  下一篇:go windows下php无法使用mcrypt的解决