VPS侦探论坛

 找回密码
 注册
查看: 294|回复: 12

求助:ERROR! MySQL server PID file could not be found!

[复制链接]
发表于 2022-11-6 07:33:39 | 显示全部楼层 |阅读模式

服務器出現故障,重啟之後MySQL出錯,請幫忙看看,謝謝!

[root@ls-412734-7810-7810 ~]# lnmp restart
+-------------------------------------------+
|    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 ~]#


附最後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



美国VPS推荐: 遨游主机LinodeLOCVPS主机云VPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2022-11-6 07:34:57 | 显示全部楼层


接上段:

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

Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2022-11-6 15:31:19 | 显示全部楼层

日志中显示3306端口被占用,说明mysql已经再运行或mysql进程已经死掉并未结束或者端口被其他程序占用
美国VPS推荐: 遨游主机LinodeLOCVPS主机云VPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2022-11-6 16:56:35 | 显示全部楼层



萬分感激
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-11-6 16:57:45 | 显示全部楼层

萬分感激

美国VPS、VPN、域名代购:http://shop63846532.taobao.com/

 楼主| 发表于 2022-11-6 16:58:03 | 显示全部楼层

萬分感激!具體處理或解決方法可否介紹一下?
 楼主| 发表于 2022-11-6 17:14:13 | 显示全部楼层

查了一下,沒有發現端口被佔用(或使用)。


+-------------------------------------------+
|    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 ~]#
美国VPS推荐: 遨游主机LinodeLOCVPS主机云VPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-11-7 08:38:29 | 显示全部楼层

fortop 发表于 2022-11-6 17:14
查了一下,沒有發現端口被佔用(或使用)。

ps aux 看一下进程
或reboot重启一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-11-7 12:58:52 | 显示全部楼层


licess 发表于 2022-11-7 08:38
ps aux 看一下进程
或reboot重启一下

已經嘗試Reboot了服務器,但都沒有變化,因為無法上載附件,我將PS AUX及錯誤日志放在網頁上,麻煩軍哥幫忙看一下,了解一下確實原因及可以如何處理,非常感謝!
PS Aux結果:
http://www.arting.com/downloads/ps-aux.txt

錯誤日志:
http://www.arting.com/downloads/error.log
美国VPS推荐: 遨游主机LinodeLOCVPS主机云VPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2022-11-7 13:08:50 | 显示全部楼层



licess 发表于 2022-11-7 08:38
ps aux 看一下进程
或reboot重启一下


附完整版錯誤日志:
http://www.arting.com/downloads/ls-412734-7810-7810.err
发表于 2022-11-8 09:53:26 | 显示全部楼层

fortop 发表于 2022-11-7 12:58
已經嘗試Reboot了服務器,但都沒有變化,因為無法上載附件,我將PS AUX及錯誤日志放在網頁上,麻煩軍哥幫 ...

rm -f /tmp/mysql.sock
/etc/init.d/mysql start
 楼主| 发表于 2022-11-8 10:54:29 | 显示全部楼层

licess 发表于 2022-11-8 09:53
rm -f /tmp/mysql.sock
/etc/init.d/mysql start

還是不成
還是不成

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 ~]#
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2022-11-9 09:26:39 | 显示全部楼层
fortop 发表于 2022-11-8 10:54
還是不成
還是不成

通过目前已有信息看无法确定
美国VPS推荐: 遨游主机LinodeLOCVPS主机云VPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2022-12-3 00:01 , Processed in 0.050350 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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