SDB:Switching between MySQL variants
tagline: From openSUSE
|Tested on openSUSE||Recommended articles||Related articles|
Starting from openSUSE 11.3, we've got multiple packages in distribution that can provide MySQL server and client. Sometimes, people may want to switch from one of these providers to another one. Or you might want to switch to the newer version. In the later case server:database repository from openSUSE Build Service may come handy.
 Available Variants
Following variants of MySQL are available in current openSUSE (in fact since 11.3) and in server:database repository.
MariaDB is a branch of MySQL maintained by community in collaboration with Monty Program. It incorporates many improvements provided by community and more opensource storage engines. It is developed in open. List of differences can be found on official site.
Package name: mariadb
 MySQL Community Server
MySQL as Oracle releases it. MySQL Community Server is one of the MySQL variants that Oracle releases. Compared to closed source enterprise one it is missing few features.
Package name: mysql-community-server
 Unstable versions
If you are not satisfied with these versions, you can use development versions. They are in the same repository, just named differently. But switching is as easy as switching between MySQL and MariaDB. Newer (and sometimes older as well) variants are named by appending _version to the package name. So for example if you want MariaDB 10.0.x, you need package mariadb_100.
You can switch easily using just the package management. Although in most cases everything should work just fine, it's alway a good idea to backup your data first. Just choose the variant you want and try to install it using package name mentioned above. Package management will take care of the rest as packages conflicts with each other. It will ask you to decide, whether do you want to uninstall your current mysql provider and install the new one, or if you want to keep it like it is.
Let's say that you have MySQL Community server and you want to try MariaDB. Workflow may look like this:
# zypper in mariadb Loading repository data... Reading installed packages... Resolving package dependencies... Problem: mysql-community-server-5.1.46-2.14.x86_64 conflicts with namespace:otherproviders(mysql) provided by mariadb-5.1.44-2.9.x86_64 Solution 1: deinstallation of mysql-community-server-5.1.46-2.14.x86_64 Solution 2: do not install mariadb-5.1.44-2.9.x86_64 Choose from above solutions by number or cancel [1/2/c] (c): 1 Resolving dependencies... Resolving package dependencies... The following NEW packages are going to be installed: libmariadbclient16 libmariadbclient_r16 mariadb mariadb-client The following packages are going to be REMOVED: mysql-community-server mysql-community-server-client 4 new packages to install, 2 to remove. Overall download size: 5.2 MiB. After the operation, 4.1 MiB will be freed. Continue? [y/n/?] (y): y Removing mysql-community-server-5.1.46-2.14 [done] Additional rpm output: Shutting down service MySQL ..done Removing mysql-community-server-client-5.1.46-2.9 [done] Retrieving package libmariadbclient_r16-5.1.44-2.9.x86_64 (1/4), 479.0 KiB (1.5 MiB unpacked) Retrieving: libmariadbclient_r16-5.1.44-2.9.x86_64.rpm [done (267.8 KiB/s)] Installing: libmariadbclient_r16-5.1.44-2.9 [done] Retrieving package libmariadbclient16-5.1.44-2.9.x86_64 (2/4), 475.0 KiB (1.5 MiB unpacked) Retrieving: libmariadbclient16-5.1.44-2.9.x86_64.rpm [done] Installing: libmariadbclient16-5.1.44-2.9 [done] Retrieving package mariadb-client-5.1.44-2.9.x86_64 (3/4), 154.0 KiB (375.0 KiB unpacked) Retrieving: mariadb-client-5.1.44-2.9.x86_64.rpm [done] Installing: mariadb-client-5.1.44-2.9 [done] Retrieving package mariadb-5.1.44-2.9.x86_64 (4/4), 4.1 MiB (21.5 MiB unpacked) Retrieving: mariadb-5.1.44-2.9.x86_64.rpm [done (5.3 MiB/s)] Installing: mariadb-5.1.44-2.9 [done]
 Possible problems
 Different plugin names
What can happen easilly is that name of the plugins have changed. So if some storage engine cannot be loaded, check whether you are trying to load correct plugin.
 Lost configuration
While switching between MySQL variants, your configuration file /etc/my.cnf might be overwritten. Usually backup copy is saved as /etc/my.cnf.rpmsave. So if your data are not available after switch, don't panic and take a look at your configuration file.
 Not supported storage engine
It might happened that your old storage engine is no longer supported by newer/different version of MySQL. So it is always a good idea to backup your data for example using mysqdump. That way, you'll have text representation of your data and you can change storage engine and reload them.