Linux租用服务器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服务)