MySQL和Mariadb都启动不了了_linux centos7mariadb安装成功启动不了 解决思路
查看系統(tǒng)日志/var/log/mariadb/mariadb.log
190313 14:31:03 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
190313 14:31:03 InnoDB: Waiting for the background threads to start
190313 14:31:04 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1597945
190313 14:31:04 [Note] Plugin 'FEEDBACK' is disabled.
190313 14:31:04 [ERROR] mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
190313 14:31:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190313 14:31:04 [Note] Server socket created on IP: '0.0.0.0'.
190313 14:31:04 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
190313 14:31:04 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
190313 14:31:04 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
190313 14:32:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190313 14:32:37 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 4335 ...
190313 14:32:37 InnoDB: The InnoDB memory heap is disabled
190313 14:32:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190313 14:32:37 InnoDB: Compressed tables use zlib 1.2.7
190313 14:32:37 InnoDB: Using Linux native AIO
190313 14:32:37 InnoDB: Initializing buffer pool, size = 128.0M
190313 14:32:37 InnoDB: Completed initialization of buffer pool
提示沒有找到plugin.frm,但是用find查找了一下,是存在的;
Can't find file: './mysql/plugin.frm'
谷歌了一下,是mysql的權限問題,如下為解決辦法:
改變mysql目錄的擁有者為mysql
chown –R mysql:mysql ????/var/lib/mysql/
結果如下:
重啟mariadb:systemctl restart mariadb.service
驗證下結果:systemctl startus? mariadb.service
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-03-14 10:17:55 CST; 21s ago
Process: 15355 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 15326 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 15354 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─15354 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─15512 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/m...
Mar 14 10:17:53 VMS94897 systemd[1]: Starting MariaDB database server...
Mar 14 10:17:53 VMS94897 mysqld_safe[15354]: 190314 10:17:53 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Mar 14 10:17:53 VMS94897 mysqld_safe[15354]: 190314 10:17:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Mar 14 10:17:55 VMS94897 systemd[1]: Started MariaDB database server.
總結
以上是生活随笔為你收集整理的MySQL和Mariadb都启动不了了_linux centos7mariadb安装成功启动不了 解决思路的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 度分秒换算题及答案C语言,度分秒的换算题
- 下一篇: 三菱plc编程有c语言吗,三菱plc编程