查看mysql日志
tail -n 100 /var/log/mysql/error.log
2023-04-07T09:40:19.985649Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.41) starting as process 1166 ...
2023-04-07T09:40:19.989425Z 0 [Note] InnoDB: PUNCH HOLE support available
2023-04-07T09:40:19.989473Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-04-07T09:40:19.989480Z 0 [Note] InnoDB: Uses event mutexes
2023-04-07T09:40:19.989488Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2023-04-07T09:40:19.989493Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-04-07T09:40:19.989502Z 0 [Note] InnoDB: Using Linux native AIO
2023-04-07T09:40:19.989873Z 0 [Note] InnoDB: Number of pools: 1
2023-04-07T09:40:19.990049Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2023-04-07T09:40:19.992165Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-04-07T09:40:20.001995Z 0 [Note] InnoDB: Completed initialization of buffer pool
2023-04-07T09:40:20.004725Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-04-07T09:40:20.017023Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-04-07T09:40:20.017239Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2023-04-07T09:40:20.017250Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2023-04-07T09:40:20.017257Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
2023-04-07T09:40:20.017290Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-04-07T09:40:20.617931Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-04-07T09:40:20.617973Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-04-07T09:40:20.617981Z 0 [ERROR] Failed to initialize builtin plugins.
2023-04-07T09:40:20.617985Z 0 [ERROR] Aborting
把mysql目录下的ib_logfile文件删除就好了,如果还不行就把ibdata1删除
[root@wms-db-02 ~]# mv /var/lib/mysql/ib_logfile0 .
[root@wms-db-02 ~]# mv /var/lib/mysql/ib_logfile1 .
[root@wms-db-02 ~]# mv /var/lib/mysql/ibdata1 .
发表评论