Replace MariaDB with MySQL

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Replace MariaDB with MySQL

Postby flipovic » Jan 15th, '13, 06:34

Hello,

I'm trying to (finally) migrate from Mandriva 2011 to Mageia 2 but, despite the really positive first impressions that I have with Mageia, there is a problem with the setup that I need to have, as I really need MySQL, and not MariaDB, installed!

Don't take me wrong, I can understand the motives for the move to MariaDB, but professionally I need to have an exact replica of the MySQL database engine that my company uses in most projects, and I cannot guarantee that using MariaDB.

I can uninstall MariaDB but it breaks too many dependencies on the system (most of the PIM and social desktop tools) and installing the workbench without MariaDB is a true pain...

So, my question is, is there a way to migrate from MariaDB to MySQL in Mageia 2? Is there a plan to support it on Mageia 3?

Thanks,
Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38

Re: Replace MariaDB with MySQL

Postby pete910 » Jan 16th, '13, 13:31

Mysql is in the repos, you can install it and run it same as you would a server. you dont need to remove the other if that's what your thinking.

I personally use it for Amarok(my PC) as well as Zoneminder(Server). all be it through a dedicated server now.

Pete
User avatar
pete910
 
Posts: 357
Joined: Jan 8th, '12, 18:53

Re: Replace MariaDB with MySQL

Postby jkerr82508 » Jan 16th, '13, 16:27

pete910 wrote:Mysql is in the repos

For Mageia 2 and later releases, mysql has been dropped. (The package mysql-MariaDB is a place holder which will result in MariaDB being installed.)

https://wiki.mageia.org/en/Mageia_2_Rel ... es#MariaDB
https://wiki.mageia.org/en/Mageia_2_Release_Notes#MySQL

I think that it is unlikely that mysql will be provided. There was lengthy discussion before the decision to switch to MariaDB was made:

http://thread.gmane.org/gmane.linux.mag ... focus=9499

Jim
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: Replace MariaDB with MySQL

Postby pete910 » Jan 16th, '13, 22:08

oops, your right, forgot the mariaDB swapout, and the fact its listed as mysql-MariaDB which through me. :oops:

However MariaDB 5.1 is supposed to be 100% compatible with mysql 5.1.

Explains it better here https://kb.askmonty.org/en/mariadb-versus-mysql-compatibility/

Pete
User avatar
pete910
 
Posts: 357
Joined: Jan 8th, '12, 18:53

Re: Replace MariaDB with MySQL

Postby flipovic » Jan 17th, '13, 03:48

Thanks for all the info, I have read the threads about MariaDB adoption decision and as I have said before I can understand the appeal to move to MariaDB, but it has implications that I cannot ignore in my professional environment as we need to have replicas of the productions databases, and despite I'm sure that MariaDB has almost the same behaviour as MySQL (probably even better from what I have read) I can't go with "almost" in my work.

Unfortunately this is a major drawback in the decision process of what distribution to adopt in my company, as we're looking for a good Mandriva replacement and Mageia is obviously one of the major contenders. :(

But I do appreciate your feedback!

Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38

Re: Replace MariaDB with MySQL

Postby pete910 » Jan 17th, '13, 11:43

They do have prebuilt rpms available on there site , if that helps

http://dev.mysql.com/downloads/mysql/#downloads
User avatar
pete910
 
Posts: 357
Joined: Jan 8th, '12, 18:53

Re: Replace MariaDB with MySQL

Postby flipovic » Jan 17th, '13, 14:07

Thanks, already tried to use them in some Mageia 2 installations, but I still have to uninstall MariaDB first in order to be able to use them, and that breaks all the mentioned dependencies scheme (kopete, amarok, ...).

One option is to maintain MariaDB system-wide, and to use a user-wise MySQL installation (from sources) for development purposes, but that is not the nicest of solutions as we would have to perform this kind of manual setup for every developer/computer...

Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38

Re: Replace MariaDB with MySQL

Postby claire » Jan 17th, '13, 18:10

Use rpm -e --nodeps to remove packages without the dependencies.
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Replace MariaDB with MySQL

Postby flipovic » Jan 18th, '13, 04:54

Thanks Claire, using rpm -e --nodeps allows me to uninstall MariaDB while keeping the installed packages that depend on it and, after installing MySQL from its download site official RPMs, I can use the mentioned packages with no problems (tested kopete and amarok), so that part is solved!

But, if I try to download a new Mageia package that depends on a MySQL backend, like mysql-workbench, it will fail because it will ask for MariaDB dependencies and even if I try to install using urpmi --allow-nodeps it still fails because of conflicts between the MariaDB dependencies and the MySQL packages that I have installed! :(

So, in conclusion, this probably means that I can have packages that depend on MariaDB working with MySQL if:
  1. I install them while I have MariaDB installed;
  2. remove MariaDB using rpm -e --nodeps;
  3. and install MySQL afterwards from its download site official RPMs.

This is better than not having any chance to use packages that depend on MariaDB, but it is still a little messy if I need to install such packages after I have already gone trough this process and installed MySQL in place of MariaDB...

---
Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38

Re: Replace MariaDB with MySQL

Postby claire » Jan 18th, '13, 11:47

If it's just a small number of packages you need you could download the SRPM's and alter the spec file to remove/alter the dependency before building your own rpms.
You could then add them to /etc/urpmi/skip.list so they wouldn't be upgraded with normal updates.

It's not ideal, I grant you. If you're on IRC then AL13N is the person to ask about all this, he is MariaDB maintainer and would be able to advise you better than I can.
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Replace MariaDB with MySQL

Postby flipovic » Jan 18th, '13, 19:22

Thanks again, that could do it if it was a matter of one or two packages and only on my computer, but in the long run, with different users, on different locations, that will probably try to install different packages that depend on MySQL/MariaDB this would quickly became a nightmare, and one of the main reasons we are aiming for Mageia, as we did for Mandriva in the past, is because it's easy maintenance and usability...

In the meantime I have followed your suggestion and tried to talk to AL13N on IRC and send him a PM about this.

---
Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38

Re: Replace MariaDB with MySQL

Postby alien » Jan 18th, '13, 21:11

a simpler solution would be to install MySQL in a chroot and using it from there, or have a virtualized system for testing purposes, that would mean you can work on your normal system and you could test run it on the Oracle MySQL virtualmachine, or chroot.

The problems are as follows:
- I would suggest rebuilding the SRPMS with Oracle MySQL, but then, you will lose some security fixes MariaDB is unaffected for, and would leave you with a vulnerable setup
- But thinking about this, if you really need a test system with that level of identicalness, then the way it's built is more important than if it's MySQL or MariaDB, in that case, you'd have to have the exact same build in the exact same way, which means you'd also need the same operating system used as the production environment.

So, my advice to you is:
A) set up KVM, have a virtual machine that's the exact replica of a production environment and test on that one.
B) failing that, you'd better off using MariaDB rather than having a broken system.
C) in case you insist of getting rid of MariaDB, you could have a local copy of the SPEC files and updating them for Oracle MySQL, then finding all the extra security fixes you need (keep in mind that we can release security fixed versions BEFORE they are published, so you'd also have an insecure system and it would cost you alot of time)

but actually, it's a lot better to negotiate a dev and acceptance setup at the client's site anyway, they do appreciate you thinking of them anyway.

PS: as a side note, i've put online my first mariadb production system, which i had tested on MySQL before and decided to switch to mariadb for the extra speedup in query time.
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: Replace MariaDB with MySQL

Postby flipovic » Jan 18th, '13, 21:43

Thanks for the tips and suggestions, I will take them into account but as for virtualization/chroot I doubt that we will go with that for now...It's a solution that's close to some of what we have in mind to implement in the future, regarding development/pre-release environments, but it's not something that I think we will adopt any time soon.

As for rebuilding SRPMS I agree with your comments and as we're looking for a solution that is easy to setup and maintain, that one is out of question.

In conclusion, you all have given me different solutions that I can consider and present to my colleagues in order to help us reach a conclusion about the way to go.

I thank you all for your help!
---
Flipovic
User avatar
flipovic
 
Posts: 6
Joined: May 25th, '12, 16:38


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron