VPS侦探论坛

 找回密码
 注册
查看: 3561|回复: 5

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

[复制链接]
发表于 2017-10-16 16:26:30 | 显示全部楼层 |阅读模式

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

这是启动时的错误:

Oct 16 16:15:06 debian-8-8 mysql[24954]: ...The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ... failed!
Oct 16 16:15:06 debian-8-8 systemd[1]: mysql.service: control process exited, code=exited status=1
Oct 16 16:15:06 debian-8-8 systemd[1]: Failed to start LSB: start and stop MySQL.
Oct 16 16:15:06 debian-8-8 systemd[1]: 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最后的日志,完全没有错误提示
171015  0:07:19 [Warning] IP address '123.249.12.230' could not be resolved: Temporary failure in name resolution
171015  3:26:56 [Warning] IP address '125.77.21.113' could not be resolved: Name or service not known
171015  4:45:44 [Warning] IP address '123.249.79.179' could not be resolved: Name or service not known
171015  5:53:14 [Warning] IP address '118.89.107.132' could not be resolved: Name or service not known
171015 19:02:43 [Warning] IP address '142.252.248.191' could not be resolved: Name or service not known
171015 22:28:48 [Warning] IP address '183.61.166.115' could not be resolved: Name or service not known
171016 14:14:29 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

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


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

[ 本帖最后由 silentstage 于 2017-10-16 16:31 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-10-16 16:27:59 | 显示全部楼层


这是my.cnf的配置
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock


[mysqld]
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

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-10-16 18:59:55 | 显示全部楼层

按1楼错误信息看可能有其他mysql包,参考:https://bbs.vpser.net/thread-15119-1-1.html
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-10-16 20:23:25 | 显示全部楼层



dpkg -l|grep mysql

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


这样该怎么解决呢?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-10-16 22:40:54 | 显示全部楼层

我跟你的问题一样


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

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-10-17 12:08:34 | 显示全部楼层

回复 4# 的帖子


卸载就可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-18 10:39 , Processed in 0.027195 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表