VPS侦探论坛

 找回密码
 注册
查看: 4679|回复: 6

[Oracle] lnmpa 重启,MySQL显示重启失败

[复制链接]
发表于 2017-9-20 11:05:26 | 显示全部楼层 |阅读模式

现在使用的是lnmp1.4版本。重启了一下lnmp,但是MySQL一直停在那里,过了一会就显示失败了。
lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              https://lnmp.org             |
+-------------------------------------------+
Stoping LNMPA...
Stoping nginx...  done
[ ok ] Stopping mysql (via systemctl): mysql.service.
stop apache...  done
Starting LNMPA...
Starting nginx...  done
[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
failed!
start apache...  done



重启后的状态:
lnmp status
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              https://lnmp.org             |
+-------------------------------------------+
nginx (pid 12260 12259 12256) is running...
● mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-09-20 10:21:12 CST; 39min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/mysql.service
           ├─ 885 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/mysql/var/iZ16ovy1e3um28Z.pid
           └─1405 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/var/iZ16ovy1e3um...

Sep 20 10:19:31 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Starting LSB: start and stop MySQL...
Sep 20 10:19:31 iZ2ze4suhuyxthw2d6m29yZ mysql[12272]: Starting MySQL
Sep 20 10:19:46 iZ2ze4suhuyxthw2d6m29yZ mysql[11466]: .....................................................................................
Sep 20 10:21:12 iZ2ze4suhuyxthw2d6m29yZ mysql[12272]: ..................................................................................................... * The server quit without updating...d6m29yZ.pid).
Sep 20 10:21:12 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Control process exited, code=exited status=1
Sep 20 10:21:12 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Failed to start LSB: start and stop MySQL.
Sep 20 10:21:12 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Unit entered failed state.
Sep 20 10:21:12 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Failed with result 'exit-code'.


这个是什么情况呢?我最近刚安装了lnmp1.4
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-9-20 11:14:48 | 显示全部楼层

systemctl status mysql.service 命令和journalctl -xe内容



systemctl status mysql.service
● mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-09-20 11:02:07 CST; 10min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14004 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
   CGroup: /system.slice/mysql.service
           ├─ 885 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/mysql/var/iZ16ovy1e3um28Z.pid
           └─1405 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/var/iZ16ovy1e3um28Z

Sep 20 11:00:26 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Starting LSB: start and stop MySQL...
Sep 20 11:00:26 iZ2ze4suhuyxthw2d6m29yZ mysql[14004]: Starting MySQL
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ mysql[14004]: ..................................................................................................... * The server quit without updating PID file (/usr/
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Control process exited, code=exited status=1
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Failed to start LSB: start and stop MySQL.
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Unit entered failed state.
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Failed with result 'exit-code'.
lines 1-16/16 (END)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

journalctl -xe
--
-- Unit apt-daily.service has finished starting up.
--
-- The start-up result is done.
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Reloading.
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13909]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/ntpd" pid=13909 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.274:8): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/ntpd" pid=13909 comm="apparmor_pa
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13910]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=13910 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13910]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=13910 comm="apparmor_par
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13910]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=13910 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13910]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=13910 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13914]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/tcpdump" pid=13914 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.346:9): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=13910 comm="apparmor_pa
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.346:10): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.act
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.346:11): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pi
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.346:12): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.346:13): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/tcpdump" pid=13914 comm="apparmo
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ audit[13923]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/tcpdump" pid=13923 comm="apparmor_parser"
Sep 20 11:00:12 iZ2ze4suhuyxthw2d6m29yZ kernel: audit: type=1400 audit(1505876412.478:14): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/tcpdump" pid=13923 comm="apparmo
Sep 20 11:00:26 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Stopped LSB: start and stop MySQL.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Sep 20 11:00:26 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Starting LSB: start and stop MySQL...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Sep 20 11:00:26 iZ2ze4suhuyxthw2d6m29yZ mysql[14004]: Starting MySQL
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ mysql[14004]: ..................................................................................................... * The server quit without updating PID file (/usr/
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Control process exited, code=exited status=1
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: Failed to start LSB: start and stop MySQL.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Unit entered failed state.
Sep 20 11:02:07 iZ2ze4suhuyxthw2d6m29yZ systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 20 11:05:01 iZ2ze4suhuyxthw2d6m29yZ CRON[14779]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 20 11:05:01 iZ2ze4suhuyxthw2d6m29yZ CRON[14780]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Sep 20 11:05:01 iZ2ze4suhuyxthw2d6m29yZ CRON[14779]: pam_unix(cron:session): session closed for user root
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-9-20 16:52:26 | 显示全部楼层

按反馈必读提供mysql日志信息
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-9-21 11:46:08 | 显示全部楼层

mysql error日志




2017-09-20T02:18:05.801976Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-09-20T02:18:05.802059Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.18-log) starting as process 11994 ...
2017-09-20T02:18:05.808663Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-09-20T02:18:05.808700Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-20T02:18:05.808704Z 0 [Note] InnoDB: Uses event mutexes
2017-09-20T02:18:05.808707Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-09-20T02:18:05.808711Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-20T02:18:05.809144Z 0 [Note] InnoDB: Number of pools: 1
2017-09-20T02:18:05.809267Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-09-20T02:18:05.810439Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-20T02:18:05.818507Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-09-20T02:18:05.821162Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-09-20T02:18:05.831230Z 0 [ERROR] InnoDB: Unable to lock /usr/local/mysql/var/ibdata1 error: 11
2017-09-20T02:18:05.831249Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2017-09-20T02:18:05.831253Z 0 [Note] InnoDB: Retrying to lock the first data file
2017-09-20T02:18:06.831333Z 0 [ERROR] InnoDB: Unable to lock /usr/local/mysql/var/ibdata1 error: 11
2017-09-20T02:18:06.831356Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2017-09-20T02:18:07.831451Z 0 [ERROR] InnoDB: Unable to lock /usr/local/mysql/var/ibdata1 error: 11
2017-09-20T02:18:07.831477Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2017-09-20T02:18:05.801976Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-09-20T02:18:05.802059Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.18-log) starting as process 11994 ...
2017-09-20T02:18:05.808663Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-09-20T02:18:05.808700Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-20T02:18:05.808704Z 0 [Note] InnoDB: Uses event mutexes
2017-09-20T02:18:05.808707Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-09-20T02:18:05.808711Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-20T02:18:05.809144Z 0 [Note] InnoDB: Number of pools: 1
2017-09-20T02:18:05.809267Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-09-20T02:18:05.810439Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-20T02:18:05.818507Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-09-20T02:18:05.821162Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-9-21 11:47:06 | 显示全部楼层

原帖由 licess 于 2017-9-20 16:52 发表
按反馈必读提供mysql日志信息



2017-09-20T08:50:32.864816Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-09-20T08:50:32.864900Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.18-log) starting as process 2252 ...
2017-09-20T08:50:32.872305Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-09-20T08:50:32.872334Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-20T08:50:32.872338Z 0 [Note] InnoDB: Uses event mutexes
2017-09-20T08:50:32.872342Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-09-20T08:50:32.872345Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-20T08:50:32.872753Z 0 [Note] InnoDB: Number of pools: 1
2017-09-20T08:50:32.872877Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-09-20T08:50:32.874059Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-20T08:50:32.882290Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-09-20T08:50:32.885851Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-09-20T08:50:32.897797Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-09-20T08:50:32.930530Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-09-20T08:50:32.930572Z 0 [Note] InnoDB: Setting file '/usr/local/mysql/var/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-09-20T08:50:33.079923Z 0 [Note] InnoDB: File '/usr/local/mysql/var/ibtmp1' size is now 12 MB.
2017-09-20T08:50:33.080577Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-09-20T08:50:33.080585Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-09-20T08:50:33.081602Z 0 [Note] InnoDB: Waiting for purge to start
2017-09-20T08:50:33.131742Z 0 [Note] InnoDB: 5.7.18 started; log sequence number 31929255
2017-09-20T08:50:33.131846Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/mysql/var/ib_buffer_pool
2017-09-20T08:50:33.131961Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-09-20T08:50:33.135241Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170920 16:50:33
2017-09-20T08:50:33.141712Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2017-09-20T08:50:33.141724Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-09-20T08:50:33.141753Z 0 [Note] IPv6 is available.
2017-09-20T08:50:33.141760Z 0 [Note]   - '::' resolves to '::';
2017-09-20T08:50:33.141784Z 0 [Note] Server socket created on IP: '::'.
2017-09-20T08:50:33.148600Z 0 [Note] Event Scheduler: Loaded 0 events
2017-09-20T08:50:33.148744Z 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.7.18-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
2017-09-20T08:50:33.148755Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.

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

发表于 2017-9-21 16:25:10 | 显示全部楼层

回复 4# 的帖子


可能mysql数据库所在分区或磁盘满了或者数据库目录权限有问题
 楼主| 发表于 2017-9-21 16:38:43 | 显示全部楼层

原帖由 licess 于 2017-9-21 16:25 发表
可能mysql数据库所在分区或磁盘满了或者数据库目录权限有问题


我安装好后没有动过,新买的测试服务器,磁盘足够,目录权限问题没有改过,我再看看。
谢谢
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-2 14:55 , Processed in 0.028323 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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