silentstage 发表于 2017-10-16 16:26:30

MySQL重启后出现无法找到PID错误

救命啊!!我是linux小白,用一键包搭了个小博客,一直运行很好今天修改了下nginx的配置,用lnmp restart了下,结果mysql就启动不起来了!!
我发誓一点mysql的东西都没有动过环境是debian8.8,lnmp1.4,mysql是默认选项,应该是5.5版本

这是启动时的错误:

Oct 16 16:15:06 debian-8-8 mysql: ...The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ... failed!
Oct 16 16:15:06 debian-8-8 systemd: mysql.service: control process exited, code=exited status=1
Oct 16 16:15:06 debian-8-8 systemd: Failed to start LSB: start and stop MySQL.
Oct 16 16:15:06 debian-8-8 systemd: Unit mysql.service entered failed state.


之前启动还有一个Log文件错误和mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
我手动按错误提示建了目录和空文件,没有了

这是/usr/local/mysql/var/debian-8-8.err最后的日志,完全没有错误提示
1710150:07:19 IP address '123.249.12.230' could not be resolved: Temporary failure in name resolution
1710153:26:56 IP address '125.77.21.113' could not be resolved: Name or service not known
1710154:45:44 IP address '123.249.79.179' could not be resolved: Name or service not known
1710155:53:14 IP address '118.89.107.132' could not be resolved: Name or service not known
171015 19:02:43 IP address '142.252.248.191' could not be resolved: Name or service not known
171015 22:28:48 IP address '183.61.166.115' could not be resolved: Name or service not known
171016 14:14:29 /usr/local/mysql/bin/mysqld: Normal shutdown

171016 14:14:29 Event Scheduler: Purging the queue. 0 events
171016 14:14:29InnoDB: Starting shutdown...
171016 14:14:30InnoDB: Shutdown completed; log sequence number 7370778775
171016 14:14:30 /usr/local/mysql/bin/mysqld: Shutdown complete


之前这个问题在我另外个网盘机器也出过一次,不过数据不重要最后重装解决了。
现在是一头雾水!!
不知道解决错误的方向
google都翻烂了,都没解决
非常着急,在线等,请各位大大提点意见,万分感谢!!!如果数据库恢复不了,有没有办法备份出来??
我查了下上次snapshot是7月份~~~~>_<~~~~~

[ 本帖最后由 silentstage 于 2017-10-16 16:31 编辑 ]

silentstage 发表于 2017-10-16 16:27:59

这是my.cnf的配置

#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock



port            = 3306
socket          = /tmp/mysql.sock

datadir = /usr/local/mysql/var

skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
thread_cache_size = 8
query_cache_size = 8M
tmp_table_size = 16M

#skip-networking
max_connections = 500
max_connect_errors = 100
open_files_limit = 65535

log-bin=mysql-bin
binlog_format=mixed
server-id       = 1
expire_logs_days = 10

default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_data_home_dir = /usr/local/mysql/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/var
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50


quick
max_allowed_packet = 16M


no-auto-rehash


key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M


interactive-timeout

licess 发表于 2017-10-16 18:59:55

按1楼错误信息看可能有其他mysql包,参考:https://bbs.vpser.net/thread-15119-1-1.html

silentstage 发表于 2017-10-16 20:23:25

dpkg -l|grep mysql

iilibdbd-mysql-perl               4.028-2+deb8u2                     amd64      Perl5 database interface to the MySQL database
iilibmysqlclient18:amd64            5.5.57-0+deb8u1                  amd64      MySQL database client library
iimysql-common                      5.5.57-0+deb8u1                  all          MySQL database common files, e.g. /etc/mysql/my.cnf


这样该怎么解决呢?

zengyuhua 发表于 2017-10-16 22:40:54

我跟你的问题一样

我跟你一样的问题我跟你一样的问题

licess 发表于 2017-10-17 12:08:34

回复 4# 的帖子

卸载就可以了
页: [1]
查看完整版本: MySQL重启后出现无法找到PID错误