MySQL 服务器无法启动

MySQL 服务器无法启动

我使用 apt 安装了 MySQL-server-5.7:

apt-get install mysql-server-5.7

但是当我想使用以下方法启动服务器时:systemctl start mysql我出现了错误。

使用service msyql status查看状态,我收到错误消息:

mysql.service - MySQL Community Server
    loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:enabled)
    Acitve: inactive(dead) .......
    Process: 2490 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre(code=exited, status=1/FAILURE)

.........: Failed to start MYSQL Community Server.
.........: mysql.service: Unit entered failed state.
........................................
........................................
.........: Failed to start MySQL COmmunity Server.

如何解决?谢谢。


8 19:15:32 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:32 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:38 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:37 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:40 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:40 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:45 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:45 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:45 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:45 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:46 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:46 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:46 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:46 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:46 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:47 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:46 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 19:15:55 philip-ThinkPad-T400 gnome-session[1185]: 2016-05-28 19:15:55 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
May 28 20:56:40 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:41 philip-ThinkPad-T400 kernel: [27523.648055] audit: type=1400 audit(1464440201.506:23): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/mysqld" pid=15883 comm="apparmor_parser"
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 20:56:42 philip-ThinkPad-T400 mysql-systemd-start[15982]: MySQL system database not found. Please run mysql_install_db tool.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 20:56:42 philip-ThinkPad-T400 mysql-systemd-start[15987]: MySQL system database not found. Please run mysql_install_db tool.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 20:56:42 philip-ThinkPad-T400 mysql-systemd-start[15991]: MySQL system database not found. Please run mysql_install_db tool.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 20:56:42 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 20:56:43 philip-ThinkPad-T400 mysql-systemd-start[16003]: MySQL system database not found. Please run mysql_install_db tool.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 20:56:43 philip-ThinkPad-T400 mysql-systemd-start[16009]: MySQL system database not found. Please run mysql_install_db tool.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: mysql.service: Start request repeated too quickly.
May 28 20:56:43 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 20:59:39 philip-ThinkPad-T400 whoopsie[629]: [20:59:39] Parsing /var/crash/mysql-server-5.7.0.crash.
May 28 20:59:39 philip-ThinkPad-T400 whoopsie[629]: [20:59:39] Uploading /var/crash/mysql-server-5.7.0.crash.
May 28 21:30:59 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:30:59 philip-ThinkPad-T400 mysql-systemd-start[16882]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:30:59 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:30:59 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:30:59 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:30:59 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:31:00 philip-ThinkPad-T400 mysql-systemd-start[16888]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:31:00 philip-ThinkPad-T400 mysql-systemd-start[16893]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:31:00 philip-ThinkPad-T400 mysql-systemd-start[16897]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:31:00 philip-ThinkPad-T400 mysql-systemd-start[16902]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:31:00 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:31:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:31:01 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:31:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Start request repeated too quickly.
May 28 21:31:01 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:59:00 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:59:01 philip-ThinkPad-T400 mysql-systemd-start[792]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 21:59:01 philip-ThinkPad-T400 mysql-systemd-start[814]: MySQL system database not found. Please run mysql_install_db tool.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 21:59:01 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
M
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:02:50 philip-ThinkPad-T400 mysql-systemd-start[6532]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: mysql.service: Start request repeated too quickly.
May 28 23:02:50 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:05:27 philip-ThinkPad-T400 mysql-systemd-start[6580]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:05:27 philip-ThinkPad-T400 mysql-systemd-start[6586]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:05:27 philip-ThinkPad-T400 mysql-systemd-start[6591]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:05:27 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:05:28 philip-ThinkPad-T400 mysql-systemd-start[6595]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Starting MySQL Community Server...
May 28 23:05:28 philip-ThinkPad-T400 mysql-systemd-start[6600]: MySQL system database not found. Please run mysql_install_db tool.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Control process exited, code=exited status=1
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Unit entered failed state.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Stopped MySQL Community Server.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: mysql.service: Start request repeated too quickly.
May 28 23:05:28 philip-ThinkPad-T400 systemd[1]: Failed to start MySQL Community Server.
2016-05-28T13:03:00.146079Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-28T13:03:00.146913Z 0 [Note] mysqld (mysqld 5.7.12-0ubuntu1) starting as process 16527 ...
2016-05-28T13:03:00.152578Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-05-28T13:03:00.152618Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-05-28T13:03:00.152629Z 0 [Note] InnoDB: Uses event mutexes
2016-05-28T13:03:00.152639Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-05-28T13:03:00.152648Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-05-28T13:03:00.152658Z 0 [Note] InnoDB: Using Linux native AIO
2016-05-28T13:03:00.152977Z 0 [Note] InnoDB: Number of pools: 1
2016-05-28T13:03:00.153103Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-05-28T13:03:00.167167Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-05-28T13:03:00.181272Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-05-28T13:03:00.183512Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-05-28T13:03:00.203750Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-05-28T13:03:00.282868Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-05-28T13:03:00.283012Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-05-28T13:03:00.681993Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-05-28T13:03:00.683563Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-05-28T13:03:00.683581Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-05-28T13:03:00.683914Z 0 [Note] InnoDB: Waiting for purge to start
2016-05-28T13:03:00.734269Z 0 [Note] InnoDB: 5.7.12 started; log sequence number 1209961
2016-05-28T13:03:00.735539Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-05-28T13:03:00.735907Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2016-05-28T13:03:00.736275Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-05-28T13:03:00.736543Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160528 21:03:00
2016-05-28T13:03:00.737858Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-05-28T13:03:00.738051Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-05-28T13:03:00.738089Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2016-05-28T13:03:00.738122Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2016-05-28T13:03:00.738331Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2016-05-28T13:03:00.738404Z 0 [ERROR] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2016-05-28T13:03:00.738426Z 0 [ERROR] Unable to setup unix socket lock file.
2016-05-28T13:03:00.738444Z 0 [ERROR] Aborting

2016-05-28T13:03:00.738469Z 0 [Note] Binlog end
2016-05-28T13:03:00.738560Z 0 [Note] Shutting down plugin 'ngram'
2016-05-28T13:03:00.738583Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-05-28T13:03:00.738601Z 0 [Note] Shutting down plugin 'partition'
2016-05-28T13:03:00.738619Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-05-28T13:03:00.738637Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-05-28T13:03:00.738656Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-05-28T13:03:00.738674Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-05-28T13:03:00.738691Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-05-28T13:03:00.738709Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-05-28T13:03:00.738726Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-05-28T13:03:00.738743Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-05-28T13:03:00.738785Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-05-28T13:03:00.738805Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-05-28T13:03:00.738822Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-05-28T13:03:00.738840Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-05-28T13:03:00.738857Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-05-28T13:03:00.738874Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-05-28T13:03:00.738891Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-05-28T13:03:00.738908Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-05-28T13:03:00.738926Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-05-28T13:03:00.738943Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-05-28T13:03:00.738960Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2016-05-28T13:03:00.739063Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-05-28T13:03:00.739084Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-05-28T13:03:00.739102Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-05-28T13:03:00.739119Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-05-28T13:03:00.739136Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-05-28T13:03:00.739154Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-05-28T13:03:00.739171Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-05-28T13:03:00.739188Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-05-28T13:03:00.739205Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-05-28T13:03:00.739223Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-05-28T13:03:00.739240Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-05-28T13:03:00.739257Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-05-28T13:03:00.739275Z 0 [Note] Shutting down plugin 'InnoDB'
2016-05-28T13:03:00.739378Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-05-28T13:03:00.739608Z 0 [Note] InnoDB: Starting shutdown...
2016-05-28T13:03:00.839980Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2016-05-28T13:03:00.840374Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 160528 21:03:00
2016-05-28T13:03:02.497062Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1209980
2016-05-28T13:03:02.499535Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2016-05-28T13:03:02.499554Z 0 [Note] Shutting down plugin 'MEMORY'
2016-05-28T13:03:02.499563Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-05-28T13:03:02.499622Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-05-28T13:03:02.499630Z 0 [Note] Shutting down plugin 'MyISAM'
2016-05-28T13:03:02.499650Z 0 [Note] Shutting down plugin 'CSV'
2016-05-28T13:03:02.499658Z 0 [Note] Shutting down plugin 'sha256_password'
2016-05-28T13:03:02.499665Z 0 [Note] Shutting down plugin 'mysql_native_password'
2016-05-28T13:03:02.499817Z 0 [Note] Shutting down plugin 'binlog'
2016-05-28T13:03:02.499995Z 0 [Note] mysqld: Shutdown complete

2016-05-28T13:19:55.147607Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-28T13:19:55.148439Z 0 [Note] mysqld (mysqld 5.7.12-0ubuntu1) starting as process 16703 ...
2016-05-28T13:19:55.153921Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-05-28T13:19:55.153964Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-05-28T13:19:55.153975Z 0 [Note] InnoDB: Uses event mutexes
2016-05-28T13:19:55.153985Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-05-28T13:19:55.153995Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-05-28T13:19:55.154005Z 0 [Note] InnoDB: Using Linux native AIO
2016-05-28T13:19:55.154321Z 0 [Note] InnoDB: Number of pools: 1
2016-05-28T13:19:55.154444Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-05-28T13:19:55.168174Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-05-28T13:19:55.186762Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-05-28T13:19:55.188969Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-05-28T13:19:55.199047Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2016-05-28T13:19:55.199075Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2016-05-28T13:19:55.199091Z 0 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
2016-05-28T13:19:55.199107Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-05-28T13:19:55.800074Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-05-28T13:19:55.800139Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-05-28T13:19:55.800164Z 0 [ERROR] Failed to initialize plugins.
2016-05-28T13:19:55.800183Z 0 [ERROR] Aborting

2016-05-28T13:19:55.800205Z 0 [Note] Binlog end
2016-05-28T13:19:55.800317Z 0 [Note] Shutting down plugin 'MyISAM'
2016-05-28T13:19:55.800358Z 0 [Note] Shutting down plugin 'CSV'
2016-05-28T13:19:55.801146Z 0 [Note] mysqld: Shutdown complete

答案1

在你的日志中我看到

无法创建 unix 套接字锁文件 /var/run/mysqld/mysqld.sock.lock

如果目录不存在,则创建该目录:sudo mkdir /var/run/mysqld。更改所有权:sudo chown mysql:mysql /var/run/mysqld。

相关内容