When a product that works and pays off, and is open source, falls into the hands of a company whose goal is none other than to make more and more money, the world trembles.
It already happened with OpenOffice at the time and now it's the turn of MySQL. Bearing to Oracle behind nobody knows what can happen and it is good to know that there are alternatives and specifically the best of all is Maria D.B..
Quoting Wikipedia:
MariaDB is a database management system derived from MySQL with GPL license. It is developed by michael widenius (founder of MySQL) and the developer community FOSS. Enter two storage engines new, one called Aria -which replaces with advantages MyISAM- and another call XtraDB -replacing InnoDB. It has a high compatibility with MySQL since it has the same commands, interfaces, APIs and libraries, its objective being to be able to change one server for another directly.
So without further ado let's see how to go from MySQL a Maria D.B..
Migrating from MySQL to Maria DB
This process cannot be done hot. In other words, we have to stop for a moment our services and processes that are executing MySQL.
# service stop apache2 # service stop nginx # service stop mysql
In this case we stop Apache or NGinx depending on which one we are using, and of course we also stop MySQL.
Later we make a backup of our MySQL database:
# mysqldump -u root -p --all-databases > mysqlbackup.sql
And we remove all packages related to MySQL:
# aptitude remove mysql-server-core-5.5 mysql-server-5.5 mysql-server mysql-common mysql-client-5.5 libmysqlclient18
Now we have to install Maria DB. Unfortunately, it is not in the Debian repositories yet, but we can install it using its own repositories. For other distributions, you can see the instructions here.
We add the following to our /etc/sources.list file:
# MariaDB 5.5 repository list - created 2013-08-02 13:48 UTC # http://mariadb.org/mariadb/repositories/ deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy main deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy main
Then we update and install Maria DB:
sudo aptitude update sudo apt-get install mariadb-server
We start Maria DB (if it did not do it automatically) and check that it is working:
# mysql -u root -p -Be 'show databases' Enter password:
Some settings have changed considerably between MySQL and MariaDB, however it is very easy to work with. Almost everything that changed has to do with the mechanisms that have been replaced, for example, replication. We only have to copy the performance optimization options that we had in the file my.cnf de MySQL, and reconfigure the rest by hand.
For example, these data:
bind-address = 127.0.0.1 max_connections = 10 connect_timeout = 30 wait_timeout = 600 max_allowed_packet = 16M thread_cache_size = 256 OR sort = 16M bulk_insert_buffer_size = 16M tmp_table_size = 64M max_heap_table_size = 64M
We make the necessary changes and restart Maria DB.
# service mysql restart Stopping MariaDB database server: mysqld. Starting MariaDB database server: mysqld. . . Checking for corrupt, not cleanly closed and upgrade needing tables .. # mysql -u root -p -Be 'show databases' Enter password:
Yes, Maria D.B. keep the same mysql name to restart the service, in order to maintain better compatibility. If everything is fine, then we start the rest of the services:
# service apache2 start # service nginx start
And ready. If we want to go back (which I don't recommend), we just have to run:
# service mysql stop # apt-get remove mariadb-server-5.5 mariadb-common mariadb-client-5.5 libmariadbclient18 # apt-get install mysql-server
Source: Article taken and modified from BeginLinux
As the load of the backup of the database is missing.
I think not necessarily, but thanks for the clarification. We did the backup in case the current Database fails, since it seems to me that both use the same DB. I will have to read more on the subject.
Fedora 19 already comes with Maria by default, but neither short nor lazy I migrated my web-apps to PostgreSQL, since MySQL hit us the horns, I hope PostgreSQL stays faithful for at least 2-3 years.
ArchLinux also includes Maria DB 😀
You have an Arch vice ... Even I have weak teeth and want to use it again ... but I'm lazy. 😀
I see a trend of systems including support for MariaDB and according to what I have read it seems to be at the level of MySQL and even surpass it in some aspects, but my question is: the fact that now Oracle is behind MySQL to migrate and so by the way abandoning a time-tested and million-use bd manager?
You are right. Just saying Oracle is reason enough to run out of MySQL. Also, Maria DB is a fork of MySQL maintained by the creator of MySQL and the Community. I don't know about you, but at least that gives me a lot of security. And if we add to that that the compatibility is very good, because I think there are no excuses to switch to Maria DB.
😉
And that is why I refuse to install Java on my Debian. I hardly use OpenJDK with IcedTea and it works wonders, and better than Java.
Well, man, I'm sure you must have your reasons for hating Oracle (it smells like those that make you hate Microsoft, Apple and even Google) but since Oracle hasn't done anything to me ... and I think I was going to give you a SPARC for your birthday XD
It refers to the software level, not the hardware level.
No, if we are going to hate, we hate everything, that half measures is not cool ... hehehehehehe
xDDD
Thanks elav, by the way, is it advisable to have both web servers and started at the same time?
Regards!
Some people use Apache as a web server and NGnix as a proxy for web requests. Quite a mess. For example when using Node.js, which uses a port from the back that nobody uses and possibly your ISP has it blocked 😀
Good migration tutor. Also, Slackware long ago migrated to MariaDB to avoid further mess with MySQL.
As soon as it's on the Debian backport security repo, I'll announce it as soon as possible. For now I am putting together my tutorial about installing / configuring / customizing Slackware.
But does kde still depend on mysql (on debian) or with this migration it is no longer necessary?
So from what I understood, every application configured with mysql would not have to reconfigure anything of it? Just install MariaDB (and uninstall mysql) and keeping the names as mysql should work?
Regarding performance, engine changes are mentioned.
Do they perform outstandingly with the old MylSam and InnoDB?
Someone performed any metrics?
http://tuxapuntes.com/conociendo-un-poco-de-mariadb/
I understood haha, Thank you!
Thanks a lot! now if it is clear to me; D
Unable to set password for the MariaDB "root" user
│
│ An error occurred while setting the password for the MariaDB │
│ administrative user. This may have happened because the account already │
│ has a password, or because of a communication problem with the MariaDB │
│ server. │
│ │
│ You should check the account's password after the package installation. │
│ │
│ Please read the /usr/share/doc/mariadb-server-10.1/README.Debian file │
│ for more information.
I uninstalled the mariadb maridb-server packages
I removed the directory / var / lib / mysql.
3 Reinstalled the Mariadb, Mariadb-server packages.
systemct start mariadb; systemctl enable mariadb (problem solved).