MySql运行正常,系统出现问题,但是重启服务器后启动mysql并报错。系统版本:CentOS Linux版本7.7.1908 该如何解决?
这是日志
[flink@master sbin]$ ./mysqld
2020-07-22 15:42:13 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-07-22 15:42:13 0 [Note] ./mysqld (mysqld 5.6.45) starting as process 6401 ...
2020-07-22 15:42:13 6401 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5010)
2020-07-22 15:42:13 6401 [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 1000)
2020-07-22 15:42:13 6401 [Warning] Buffered warning: Changed limits: table_open_cache: 400 (requested 2000)
2020-07-22 15:42:13 6401 [Note] Plugin 'FEDERATED' is disabled.
./mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2020-07-22 15:42:13 6401 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2020-07-22 15:42:13 6401 [Note] InnoDB: Using atomics to ref count buffer pool pages
2020-07-22 15:42:13 6401 [Note] InnoDB: The InnoDB memory heap is disabled
2020-07-22 15:42:13 6401 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-07-22 15:42:13 6401 [Note] InnoDB: Memory barrier is not used
2020-07-22 15:42:13 6401 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-22 15:42:13 6401 [Note] InnoDB: Using Linux native AIO
2020-07-22 15:42:13 6401 [Note] InnoDB: Using CPU crc32 instructions
2020-07-22 15:42:13 6401 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-07-22 15:42:13 6401 [Note] InnoDB: Completed initialization of buffer pool
2020-07-22 15:42:13 6401 [Note] InnoDB: Highest supported file format is Barracuda.
2020-07-22 15:42:13 6401 [Note] InnoDB: 128 rollback segment(s) are active.
2020-07-22 15:42:13 6401 [Note] InnoDB: Waiting for purge to start
2020-07-22 15:42:13 6401 [Note] InnoDB: 5.6.45 started; log sequence number 1600627
2020-07-22 15:42:13 6401 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: db5e3d0e-cbee-11ea-9
这是启动mysql后的sql状态
[flink@master mysql]$ systemctl status mysqld
● mysqld.service - MySQL Community Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: activating (start-post) (Result: exit-code) since Wed 2020-07-22 15:49:34 CST; 1min 5s ago
Process: 8318 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=1/FAILURE)
Process: 8303 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 8318 (code=exited, status=1/FAILURE); : 8319 (mysql-systemd-s)
Tasks: 2
Memory: 17.7M
CGroup: /system.slice/mysqld.service
└─control
├─8319 /bin/bash /usr/bin/mysql-systemd-start post
└─8817 sleep 1
Jul 22 15:49:34 master systemd[1]: Starting MySQL Community Server...
Jul 22 15:49:35 master mysqld_safe[8318]: 200722 15:49:35 mysqld_safe Logging to '/var/lib/mysql/mysqld.log'.
Jul 22 15:49:35 master mysqld_safe[8318]: /usr/bin/mysqld_safe: line 138: /var/lib/mysql/mysqld.log: Permission denied
Jul 22 15:49:35 master mysqld_safe[8318]: 200722 15:49:35 mysqld_safe Directory '/home/flink/hdd/mysql_data/mysql' for UNIX socket file... exists.
Jul 22 15:49:35 master systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Hint: Some lines were ellipsized, use -l to show in full.