VPS侦探论坛
标题: 求助:ERROR! MySQL server PID file could not be found! [打印本页]
作者: fortop 时间: 2022-11-6 07:33
标题: 求助:ERROR! MySQL server PID file could not be found!
服務器出現故障,重啟之後MySQL出錯,請幫忙看看,謝謝!
[root@ls-412734-7810-7810 ~]# lnmp restart
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
+-------------------------------------------+
Stoping LNMP...
Stoping nginx... done
ERROR! MySQL server PID file could not be found!
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx... done
Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/var/ls-412734-7810-7810.pid).
Starting php-fpm done
[root@ls-412734-7810-7810 ~]#
附最後100行錯誤日志:
[root@ls-412734-7810-7810 ~]# tail -n 100 /usr/local/mysql/var/ls-412734-7810-7810.err
2022-11-05T23:26:50.729579Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2022-11-05T23:26:50.729650Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.30) starting as process 5210 ...
2022-11-05T23:26:50.734182Z 0 [Warning] You need to use --log-bin to make --binlog-format work.
2022-11-05T23:26:50.743235Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-11-05T23:26:50.743277Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-11-05T23:26:50.743280Z 0 [Note] InnoDB: Uses event mutexes
2022-11-05T23:26:50.743282Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-11-05T23:26:50.743284Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-11-05T23:26:50.743287Z 0 [Note] InnoDB: Using Linux native AIO
2022-11-05T23:26:50.743674Z 0 [Note] InnoDB: Number of pools: 1
2022-11-05T23:26:50.743751Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-11-05T23:26:50.745067Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2022-11-05T23:26:50.775017Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-11-05T23:26:50.780634Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-11-05T23:26:50.791368Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-11-05T23:26:50.976604Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-11-05T23:26:50.976702Z 0 [Note] InnoDB: Setting file '/usr/local/mysql/var/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-11-05T23:26:50.993291Z 0 [Note] InnoDB: File '/usr/local/mysql/var/ibtmp1' size is now 12 MB.
2022-11-05T23:26:50.994016Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2022-11-05T23:26:50.994030Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2022-11-05T23:26:50.994641Z 0 [Note] InnoDB: Waiting for purge to start
2022-11-05T23:26:51.044822Z 0 [Note] InnoDB: 5.7.30 started; log sequence number 4337342370277
2022-11-05T23:26:51.071625Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/mysql/var/ib_buffer_pool
2022-11-05T23:26:51.081194Z 0 [Note] Plugin 'FEDERATED' is disabled.
2022-11-05T23:26:51.221088Z 0 [Note] InnoDB: Buffer pool(s) load completed at 221106 7:26:51
2022-11-05T23:26:51.237204Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2022-11-05T23:26:51.237233Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2022-11-05T23:26:51.238064Z 0 [Warning] CA certificate ca.pem is self signed.
2022-11-05T23:26:51.264751Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2022-11-05T23:26:51.264986Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2022-11-05T23:26:51.265067Z 0 [Note] IPv6 is available.
2022-11-05T23:26:51.265077Z 0 [Note] - '::' resolves to '::';
2022-11-05T23:26:51.265109Z 0 [Note] Server socket created on IP: '::'.
2022-11-05T23:26:51.266424Z 0 [ERROR] Can't start server : Bind on unix socket: Address already in use
2022-11-05T23:26:51.266437Z 0 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
2022-11-05T23:26:51.266448Z 0 [ERROR] Aborting
作者: fortop 时间: 2022-11-6 07:34
接上段:
2022-11-05T23:26:51.266460Z 0 [Note] Binlog end
2022-11-05T23:26:51.266574Z 0 [Note] Shutting down plugin 'ngram'
2022-11-05T23:26:51.266578Z 0 [Note] Shutting down plugin 'partition'
2022-11-05T23:26:51.266581Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-11-05T23:26:51.266584Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-11-05T23:26:51.266585Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2022-11-05T23:26:51.266644Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2022-11-05T23:26:51.266648Z 0 [Note] Shutting down plugin 'MyISAM'
2022-11-05T23:26:51.266667Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2022-11-05T23:26:51.266671Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2022-11-05T23:26:51.266673Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2022-11-05T23:26:51.266675Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2022-11-05T23:26:51.266676Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2022-11-05T23:26:51.266678Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2022-11-05T23:26:51.266679Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2022-11-05T23:26:51.266680Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2022-11-05T23:26:51.266682Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2022-11-05T23:26:51.266684Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2022-11-05T23:26:51.266685Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2022-11-05T23:26:51.266687Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2022-11-05T23:26:51.266688Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2022-11-05T23:26:51.266690Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2022-11-05T23:26:51.266691Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2022-11-05T23:26:51.266693Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2022-11-05T23:26:51.266694Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2022-11-05T23:26:51.266696Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2022-11-05T23:26:51.266701Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2022-11-05T23:26:51.266703Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2022-11-05T23:26:51.266705Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2022-11-05T23:26:51.266706Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2022-11-05T23:26:51.266708Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2022-11-05T23:26:51.266709Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2022-11-05T23:26:51.266711Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2022-11-05T23:26:51.266712Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2022-11-05T23:26:51.266714Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2022-11-05T23:26:51.266715Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2022-11-05T23:26:51.266717Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2022-11-05T23:26:51.266718Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2022-11-05T23:26:51.266720Z 0 [Note] Shutting down plugin 'InnoDB'
2022-11-05T23:26:51.307886Z 0 [Note] InnoDB: FTS optimize thread exiting.
2022-11-05T23:26:51.308068Z 0 [Note] InnoDB: Starting shutdown...
2022-11-05T23:26:51.408482Z 0 [Note] InnoDB: Dumping buffer pool(s) to /usr/local/mysql/var/ib_buffer_pool
2022-11-05T23:26:51.408970Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 221106 7:26:51
2022-11-05T23:26:52.631933Z 0 [Note] InnoDB: Shutdown completed; log sequence number 4337342370296
2022-11-05T23:26:52.632867Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-11-05T23:26:52.632892Z 0 [Note] Shutting down plugin 'MEMORY'
2022-11-05T23:26:52.632897Z 0 [Note] Shutting down plugin 'CSV'
2022-11-05T23:26:52.632900Z 0 [Note] Shutting down plugin 'sha256_password'
2022-11-05T23:26:52.632902Z 0 [Note] Shutting down plugin 'mysql_native_password'
2022-11-05T23:26:52.633030Z 0 [Note] Shutting down plugin 'binlog'
2022-11-05T23:26:52.633303Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
作者: licess 时间: 2022-11-6 15:31
日志中显示3306端口被占用,说明mysql已经再运行或mysql进程已经死掉并未结束或者端口被其他程序占用
作者: fortop 时间: 2022-11-6 16:56
萬分感激
作者: fortop 时间: 2022-11-6 16:57
萬分感激
作者: fortop 时间: 2022-11-6 16:58
萬分感激!具體處理或解決方法可否介紹一下?
作者: fortop 时间: 2022-11-6 17:14
查了一下,沒有發現端口被佔用(或使用)。
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx... done
ERROR! MySQL server PID file could not be found!
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx... done
Starting MySQL..... ERROR! The server quit without updating PID file (/usr/local/mysql/var/ls-412734-7810-7810.pid).
Starting php-fpm done
[root@ls-412734-7810-7810 ~]# netstat -ntuap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 3016/systemd-resolv
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 2530/redis-server 1
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14711/nginx: master
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2522/pure-ftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2519/sshd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 14711/nginx: master
tcp 0 0 146.196.52.7:443 39.32.32.3:50013 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:443 66.249.71.219:45689 TIME_WAIT -
tcp 0 0 146.196.52.7:443 66.249.71.221:61010 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:80 58.153.114.94:54441 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:443 66.249.79.55:60857 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:22 146.59.87.70:36444 ESTABLISHED 15505/sshd: root [p
tcp 0 1432 146.196.52.7:22 58.153.114.94:53870 ESTABLISHED 6492/sshd: root [pr
tcp 0 0 146.196.52.7:443 131.153.240.2:42990 TIME_WAIT -
tcp 0 47043 146.196.52.7:443 39.32.32.3:50012 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:443 114.119.139.181:44329 TIME_WAIT -
tcp 0 0 146.196.52.7:443 158.132.13.116:51693 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:443 131.153.240.2:42980 TIME_WAIT -
tcp 0 0 146.196.52.7:443 114.119.130.18:48861 TIME_WAIT -
tcp 0 0 146.196.52.7:443 66.249.71.219:44694 TIME_WAIT -
tcp 0 0 146.196.52.7:443 66.249.79.45:62106 TIME_WAIT -
tcp 0 0 146.196.52.7:80 58.153.114.94:54373 TIME_WAIT -
tcp 0 0 146.196.52.7:443 66.249.71.223:54402 ESTABLISHED 14712/nginx: worker
tcp 0 0 146.196.52.7:443 66.249.71.217:42120 TIME_WAIT -
tcp6 0 0 :::5355 :::* LISTEN 3016/systemd-resolv
tcp6 0 0 :::21 :::* LISTEN 2522/pure-ftpd
tcp6 0 0 :::22 :::* LISTEN 2519/sshd
udp 0 0 127.0.0.53:53 0.0.0.0:* 3016/systemd-resolv
udp 0 0 127.0.0.1:323 0.0.0.0:* 2457/chronyd
udp 0 0 0.0.0.0:5355 0.0.0.0:* 3016/systemd-resolv
udp6 0 0 ::1:323 :::* 2457/chronyd
udp6 0 0 :::5355 :::* 3016/systemd-resolv
[root@ls-412734-7810-7810 ~]#
作者: licess 时间: 2022-11-7 08:38
ps aux 看一下进程
或reboot重启一下
作者: fortop 时间: 2022-11-7 12:58
已經嘗試Reboot了服務器,但都沒有變化,因為無法上載附件,我將PS AUX及錯誤日志放在網頁上,麻煩軍哥幫忙看一下,了解一下確實原因及可以如何處理,非常感謝!
PS Aux結果:
http://www.arting.com/downloads/ps-aux.txt
錯誤日志:
http://www.arting.com/downloads/error.log
作者: fortop 时间: 2022-11-7 13:08
附完整版錯誤日志:
http://www.arting.com/downloads/ls-412734-7810-7810.err
作者: licess 时间: 2022-11-8 09:53
rm -f /tmp/mysql.sock
/etc/init.d/mysql start
作者: fortop 时间: 2022-11-8 10:54
還是不成
還是不成 
Last failed login: Tue Nov 8 06:49:59 CST 2022 from 177.47.93.71 on ssh:notty
There were 2828 failed login attempts since the last successful login.
Last login: Mon Nov 7 12:41:22 2022 from 58.153.114.94
[root@ls-412734-7810-7810 ~]# \cp -r -a /usr/local/nginx/* /home/wwwroot/default/ScreenMyAdmin/upload/nginx/
cp: target '/home/wwwroot/default/ScreenMyAdmin/upload/nginx/' is not a directory
[root@ls-412734-7810-7810 ~]# \cp -r -a /usr/local/nginx/* /home/wwwroot/default/ScreenMyAdmin/upload/nginx/
[root@ls-412734-7810-7810 ~]# rm -f /tmp/mysql.sock
[root@ls-412734-7810-7810 ~]# /etc/init.d/mysql start
Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/var/ls-412734-7810-7810.pid).
[root@ls-412734-7810-7810 ~]#
作者: licess 时间: 2022-11-9 09:26
通过目前已有信息看无法确定
| 欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) |
Powered by Discuz! X3.4 |