重新安裝MariaDB后,服務一直啟動不起來,查看日志有以下錯誤:
InnoDB: No valid checkpoint found.
InnoDB: If you are attempting downgrade from MySQL 5.7.9 or later,
InnoDB: please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
170928 14:28:08 [ERROR] Plugin 'InnoDB' init function returned error.
170928 14:28:08 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170928 14:28:08 [Note] Plugin 'FEEDBACK' is disabled.
170928 14:28:08 [ERROR] Unknown/unsupported storage engine: InnoDB
170928 14:28:08 [ERROR] Aborting
從網上找了大半天,都說把原來的日志文件給刪了就行了。but where is 日志文件?,看到上面的提示,很清楚的說之前已經有文件了,順着網站進去,發現也沒有提供怎樣刪除。
后來,在一篇文章中講到,刪除日志文件的方法,看到他是在mysql目錄下找到的,順着這個思路找到我的mysql目錄在/var/lib/mysql
下,趕緊執行命令ls,發正是在它下面有日志文件 ,然后執行操作:
[root@tserver mysql]# rm ibdata1 ib_logfile0 ib_logfile1
rm: remove regular file `ibdata1'? yes
rm: remove regular file `ib_logfile0'? yes
rm: remove regular file `ib_logfile1'? yes
重啟MariaDB服務就行了。
本來是Centos 7.3的系統 啟動MariaDB的方式應該是
systemctl start mariadb #啟動服務
但是現在就變成這樣的啟動方式:
service mysql start
不知道何解。。。。。。。。。。。
下一步繼續執行命令
mysql_secure_installation
這一步我在輸入密碼的時候還是原來的密碼,輸入密碼一直Y就ok了。
-
配置集群的時候發現沒有wserp.cnf 在其他電腦上復制后無法識別,是因為沒有權限,執行一下命令:
chmod 777 /etc/my.cnf.d/wsrep.cnf
成功識別。