Page 1 of 1
Replace MariaDB with MySQL

Posted:
Jan 15th, '13, 06:34
by flipovic
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
Re: Replace MariaDB with MySQL

Posted:
Jan 16th, '13, 13:31
by pete910
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
Re: Replace MariaDB with MySQL

Posted:
Jan 16th, '13, 16:27
by jkerr82508
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#MariaDBhttps://wiki.mageia.org/en/Mageia_2_Release_Notes#MySQLI 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=9499Jim
Re: Replace MariaDB with MySQL

Posted:
Jan 16th, '13, 22:08
by pete910
oops, your right, forgot the mariaDB swapout, and the fact its listed as mysql-MariaDB which through me.
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
Re: Replace MariaDB with MySQL

Posted:
Jan 17th, '13, 03:48
by flipovic
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
Re: Replace MariaDB with MySQL

Posted:
Jan 17th, '13, 11:43
by pete910
They do have prebuilt rpms available on there site , if that helps
http://dev.mysql.com/downloads/mysql/#downloads
Re: Replace MariaDB with MySQL

Posted:
Jan 17th, '13, 14:07
by flipovic
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
Re: Replace MariaDB with MySQL

Posted:
Jan 17th, '13, 18:10
by claire
Use rpm -e --nodeps to remove packages without the dependencies.
Re: Replace MariaDB with MySQL

Posted:
Jan 18th, '13, 04:54
by flipovic
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:
- I install them while I have MariaDB installed;
- remove MariaDB using rpm -e --nodeps;
- 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
Re: Replace MariaDB with MySQL

Posted:
Jan 18th, '13, 11:47
by claire
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.
Re: Replace MariaDB with MySQL

Posted:
Jan 18th, '13, 19:22
by flipovic
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
Re: Replace MariaDB with MySQL

Posted:
Jan 18th, '13, 21:11
by alien
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.
Re: Replace MariaDB with MySQL

Posted:
Jan 18th, '13, 21:43
by flipovic
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