2

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
9
  • Since you have a dump of the whole db and considering your skills, in your place I'd just make a clean install then restore the databases.
    – Marco
    Aug 4, 2019 at 17:17
  • The error log has clues that you may have come from Windows MySQL 5.6 and going to Centos MariaDB 10.n.nn Centos installations would not normally have anything in a /usr/ folder. Aug 4, 2019 at 19:21
  • @Marco The second error log listed above was from a clean install. "Using a backup I did a complete reinstall after removing the existing database files at /var/lib/mysql completely." Aug 4, 2019 at 19:34
  • @WilsonHauck This is a Centos system period. Windows has never been installed even in a virtual machine. Aug 4, 2019 at 19:36
  • If you could post complete my.cnf content, I will try to assist. How much RAM is on the server? Aug 5, 2019 at 0:39

1 Answer 1

0

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.

1
  • Actually @Marco, I completely removed the directory "/var/lib/mysql" in much the way you suggested. Before you ask, I also removed "/etc/my.cnf". A new directory was created during the installation with an "ib_logfile0 is of different size". This appears to be a common problem even when using the stand-alone utility to create a fresh database which I've also tried "mysql_install_db --user=mysql". Aug 4, 2019 at 21:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .