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
  • 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 04 '19 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. – Wilson Hauck Aug 04 '19 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." – Dana Williams Aug 04 '19 at 19:34
  • @WilsonHauck This is a Centos system period. Windows has never been installed even in a virtual machine. – Dana Williams Aug 04 '19 at 19:36
  • If you could post complete my.cnf content, I will try to assist. How much RAM is on the server? – Wilson Hauck Aug 05 '19 at 00:39
  • @WilsonHauck Thanks for the interesting link. Unfortunately "/usr/share/mariadb/" doesn't seem to exist for the ver 10. But, I know it is going to turn out to be something like this. I may try ver 10.1 which is also supposed to be binary compatible with the older PHP version I am running. There are 2G of RAM in this system and 1G is free. I am not a Skype user but I can email you contact info. – Dana Williams Aug 05 '19 at 13:35
  • @WilsonHauck The my.cnf file is the default one for this version which looks like this: '# # This group is read both both by the client and the server # use it for options that affect everything # [client-server] # # include all files from the config directory # !includedir /etc/my.cnf.d ' – Dana Williams Aug 05 '19 at 13:52
  • @DanaWilliams This is the MariaB release history url. https://downloads.mariadb.org/mariadb/+releases/ It looks like the first STABLE release of the 10.1.nn series was 10.1.8. I do not see any release labeled just 10 for the version you are trying to run. If you have 10.0.0 is was an ALPHA release and to be avoided for production. 10.0.10 was the earliest STABLE 10.0.nn. – Wilson Hauck Aug 06 '19 at 16:26
  • @WilsonHauck, Yum automatically loads the latest stable release for a given version unless you specify otherwise. 'yum install MariaDB-server galera MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common' – Dana Williams Aug 06 '19 at 18:59

1 Answers1

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.

Marco
  • 1,709
  • 3
  • 17
  • 31
  • 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". – Dana Williams Aug 04 '19 at 21:28