重新安装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
成功识别。