Nam Nguyen
Nam Nguyen

Reputation: 2498

Upgrade to MariaDB 10 from MariaDB 5.5 via yum fails

I want to upgrade mariadb from 5.5... to 10. But when I run "yum update -y", screen show like below:

Upgrading directly from MySQL <unrecognized version package MariaDB-server-5.5.36-1.el6.x86_64
MariaDB-server-5.5.36-1.el6.x86_64 is not installed> to MariaDB 10.0 may not
be safe in all cases.  A manual dump and restore using mysqldump is
recommended.  It is important to review the MariaDB manual's Upgrading
section for version-specific incompatibilities.

A manual upgrade is required.

- Ensure that you have a complete, working backup of your data and my.cnf
  files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages.  Usually this command will
  list the packages you should remove:
  rpm -qa | grep -i '^mysql-'

  You may choose to use 'rpm --nodeps -ev <package-name>' to remove
  the package which contains the mysqlclient shared library.  The
  library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by Monty Program AB
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program

How can I fix this issue?

Upvotes: 2

Views: 1114

Answers (2)

Eyece
Eyece

Reputation: 21

I recently found steps on the official MariaDB website for upgrading to the latest stable version.

  1. under /etc/yum.repos.d/ add MariaDB.repo with the following configs:

    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.2/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1

  2. Run sudo yum install MariaDB-server MariaDB-client
    Full steps can be found in this tutorial

Upvotes: 1

Nam Nguyen
Nam Nguyen

Reputation: 2498

I fix by myself, I post here for anyone need:

I run,

rpm -qa | grep -i '^maria'

Screen show:

MariaDB-common-10.0.12-1
MariaDB-client-10.0.12-1
MariaDB-server-5.5.38-1
MariaDB-shared-10.0.12-1

My "MariaDB-server" is still 5.5, I stop and remove it (backup all before do change anything):

yum remove MariaDB-server

then install again:

yum install MariaDB-server

screen:

Total size: 56 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : MariaDB-server                                                                                                                  1/1

Installed:
  MariaDB-server.i386 0:10.0.12-1

run again:

rpm -qa | grep -i '^maria'

screen show:

MariaDB-common-10.0.12-1
MariaDB-client-10.0.12-1
MariaDB-server-10.0.12-1
MariaDB-shared-10.0.12-1

It's OK.

Upvotes: 3

Related Questions