MariaDB 5.5 to MySQL 5.6

nservices

Verified User
Joined
Dec 11, 2008
Messages
300
Hi,
Installed Centos 7 and need to work with MySQL instead of MariaDB
[root@ebay1 init.d]# yum remove MariaDB-server
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:5.5.40-1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================
Removing:
MariaDB-server x86_64 5.5.40-1.el6 installed 174 M

Transaction Summary
===================================================================================================================================================
Remove 1 Package

Installed size: 174 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
error reading information on service mysql: No such file or directory
error: %preun(MariaDB-server-5.5.40-1.el6.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package MariaDB-server-5.5.40-1.el6.x86_64
Verifying : MariaDB-server-5.5.40-1.el6.x86_64 1/1

Failed:
MariaDB-server.x86_64 0:5.5.40-1.el6

Complete!

how can I remove the MariaDB and install the MySQL 5.6 RPMs?

Regards,
 
Hello,

There should actually be 5 rpms to remove (might be 6).. to get the list of rpms to remove, type:
Code:
rpm -qa | grep MariaDB
I ususally use rpm, not yum, to delete. If you've confirmed that all Maria* entries are related to what you're trying to get rid of, try this:
Code:
rpm -e `rpm -qa | grep MariaDB`
and if needed, add --noscripts after the -e to skip scripting (not great, but might be needed if there are script issues)

Once they're all gone, then install the 4 MySQL rpms from here, assuming you're running 64-bit:
http://files.directadmin.com/services/all/mysql/64-bit/5.6.22/

Download all 4 into a directory, then run:
Code:
rpm -ivh MySQL*.rpm

If you get "scriptlet failed", one workaround is to run it like:
Code:
rpm -ivh --noscripts MySQL*.rpm
John

Update:

The guide worked for me when running it on a client machine, but the --noscripts were required for MariaDB removal.
After I checked everything above, this is the short version of the code I used for a 64-bit box, to go from:

MariaDB 5.5 -> MySQL 5.5 -> MySQL 5.6
Code:
cd /usr/local/directadmin/custombuild
mkdir -p mysql
cd mysql
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.41/MySQL-client-5.5.41-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.41/MySQL-devel-5.5.41-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.41/MySQL-server-5.5.41-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.41/MySQL-shared-5.5.41-1.linux2.6.x86_64.rpm
cd ..
./build mysql_backup
mv mysql_backups mysql_backups.`date +%F`

#after this point, you can't abort

rpm -e --noscripts `rpm -qa | grep MariaDB`
cd mysql
rpm -ivh MySQL*5.5.41*.rpm

#ensure it's running.

cd ..
./build set mysql 5.6
./build set mysql_inst yes
./build mysql

# confirm mysqld is running.

./build php n
Again, this is the short/quick version of what I typed... BUT pre-checks were done prior.. so do just copy paste this code.
Make sure you look and see what rpms you have installed before doing this.


Related guide for going from MySQL to MariaDB:
http://forum.directadmin.com/showthread.php?t=51004&p=262867#post262867
 
work, thanks for your support!
anyway, to make Life easier
1. Please add the option to select MySQL or MariaDB
2. adding MariaDB v10 to Custombuild will solve many of the needs for MySQL 5.6

Regards,
 
now, in another server, it's not working, any advice?
[root@server1 mysql]# rpm -e --nodeps MariaDB-server.x86_64
error reading information on service mysql: No such file or directory
error: %preun(MariaDB-server-5.5.41-1.el7.centos.x86_64) scriptlet failed, exit status 1
error: MariaDB-server-5.5.41-1.el7.centos.x86_64: erase failed

Regards,
 
Back
Top