Centos – MySQL (aka MariaDB) Service Won’t Start After Upgrading from MySQL 5.6 to MariaDB 10 On Centos 6

centoslampmariadbMySQL

I could use some help figuring out why upgrading from MySQL 5.6 to MariaDB 10 On Centos 6 is proving so difficult.

Below are the steps I am using followed by the error

cat /etc/centos-release
CentOS release 6.8 (Final)

mysql -V
mysql  Ver 14.14 Distrib 5.6.35, for Linux (x86_64) using  EditLine wrapper

yum -y update

mysqldump --all-databases -p  > /tmp/backupdatabase.sql 

cp /etc/my.cnf /tmp/my.cnf.bak

service mysqld stop

chkconfig mysqld off

yum remove mysql* mysql-server mysql-devel mysql-libs

edit /etc/yum.repos.d/mariadb.repo to point to MariaDB 10 source

yum clean all

yum install MariaDB-server galera MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common

Everything looks fine until this point then:

service mysql start

service mysql start
Starting MariaDB.190801 13:39:12 mysqld_safe Logging to '/var/lib/mysql/designtv.designtv.net.err'.
190801 13:39:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
...../etc/init.d/mysql: line 260: kill: (3056) - No such process

Error Log

190801 14:00:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190801 14:00:25 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
/usr/libexec/mysqld: Unknown error 1146
190801 14:00:25 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190801 14:00:25  InnoDB: Initializing buffer pool, size = 8.0M
190801 14:00:25  InnoDB: Completed initialization of buffer pool
190801 14:00:25  InnoDB: Started; log sequence number 0 44233
190801 14:00:25 [ERROR] Aborting

190801 14:00:25  InnoDB: Starting shutdown...
190801 14:00:30  InnoDB: Shutdown completed; log sequence number 0 44233
190801 14:00:30 [Note]
190801 14:00:30 mysqld_safe mysqld from pid file /var/lib/mysql/designtv.designtv.net.pid ended

"/var/lib/mysql/designtv.designtv.net.err" is world readable

ls -la /usr/share/mysql/english/errmsg.sys
-rw-r--r-- 1 root root 61764 Jan 29  2019 /usr/share/mysql/english/errmsg.sys

"[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it."

I can't run mysql_ugrade until the server is running.

Using a backup I did a complete reinstall after removing the existing database files at /var/lib/mysql completely.

Now I get this error:

190801 16:50:40  InnoDB: Initializing buffer pool, size = 8.0M
190801 16:50:40  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
190801 16:50:40 [ERROR] Plugin 'InnoDB' init function returned error.
190801 16:50:40 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190801 16:50:40 [ERROR] Aborting

190801 16:50:40 [Note]
190801 16:50:40 mysqld_safe mysqld from pid file /var/lib/mysql/designtv.designtv.net.pid ended
190801 16:53:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190801 16:53:35 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
190801 16:53:35  InnoDB: Initializing buffer pool, size = 8.0M
190801 16:53:35  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
190801 16:53:35 [ERROR] Plugin 'InnoDB' init function returned error.
190801 16:53:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190801 16:53:35 [ERROR] Aborting

Best Answer

You think you did a clean install after removing database files but you didn't.

Otherwise the second error log won't state that there is an ib_logfile0 of size different from config files specified size.

At very minimum you forgot to remove ib_logfile0 AND the /etc/mysql directory.

I suggest you to:

service mysql stop
killall -9 mysqld
mv /etc/mysql /etc/mysql.old
mv /var/lib/mysql /var/lib/mysql.old

At this point, remove installed mysql using your package manager.

Reinstall mysql, it will ask you for initialization details such as root password etc.

Reconfigure mysql to fit your needs and restart it.

Restore your databases, one by one if you have separate backups. Avoid restoring the mysql db and manually recreate all users. This will be easier for you.

This should bring an updated and working mysql.

Related Topic