Screencast: Installing MariaDB
Instead of the usual text-heavy blog posts that appear here, I thought it would be fun to mix things up and do a screencast showing exactly how easy it is to upgrade MySQL to MariaDB:
httpv://www.youtube.com/watch?v=rF7wChx0uzQ
Some notes:
- The laptop I’m using had MySQL 5.1.55 installed with one database (apart from the system database). Installing MariaDB does not impact existing data in any way and once the install completed I had instant access to my data.
- As part of the install you are given the option to set a new password for the root user. I choose to do it in the video, but you don’t need to. If you leave the password field blank the root password will not be changed. Other database users are preserved, of course.
- As with any database upgrade, before doing this to a production system you should have backups and test.
Links:
Links shown or mentioned in the video:
- http://kb.askmonty.org/en/installing-mariadb-deb-files
- http://downloads.askmonty.org/mariadb/
- http://downloads.askmonty.org/mariadb/repositories/
- and of course: https://mariadb.org/
Comments?
What do you think? Should we make more screencasts? If so, what would you like to see demonstrated?
hi,
1. i followed your steps to upgrade to mariadb. but when asked to install or keep modified configuration file, i choose N. how to restart the installation so i can choose to install new configuration file. or is it also ok like that?
2. in my phpmyadmin, i got this notice :
Your PHP MySQL library version 5.2.10-MariaDB differs from your MySQL server version 5.1.41. This may cause unpredictable behavior.
what should i do?
In the video, the modified file is ‘/etc/mysql/debian-start’. This file is part of the mariadb-server-5.2 package. In my experience, when you choose to not use a package maintainer’s version of a file (by e.g. opting to keep your customized version) dpkg will place the file where it goes, but give it a ‘.dist’ suffix. So you might check to see if there is a /etc/mysql/debian-start.dist file. Copying this over the top of the old file will upgrade it to the version in the MariaDB package. You can also use diff or meld to see the differences between the two files. Another thing you could do is “sudo dpkg-reconfigure mariadb-server-5.2” and that might give you the keep/replace prompt again.
As far as number two is concerned it appears phpmyadmin is still seeing an old server. Is an old MySQL still running somewhere? The library should be able to connect fine to the old server, but you probably want to investigate it to make sure you don’t have something lying around that you don’t want (thus the advice to have backups and test before putting any database upgrade into production).
Good luck!
hi,
thanks for your quick reply.
yeah, its work! my problems solved already. what i did was replace my current my.cnf file with my.cnf.dpkg-dist file. in my case, my modified file is my.cnf.
after restart mysql, Server version: 5.2.10-MariaDB-mariadb107~lucid. nice!
so now i can proceed to change all my tables from MyISAM to Aria.
I found this link useful. http://byte-consult.be/2011/06/07/running-wordpress-nginx/
What do you think? Do you have any better solution?
I’ve never used nginx or spawn-fcgi so I can’t really comment on that part of the instructions.
As it says in the post, the directions they post regarding using the ourdelta repository are old, but they link to the updated Knowledgebase instructions, so that is fine.
As far as the schema changes are concerned, instead of changing the WordPress schema, I would just update the sql_mode variable in /etc/mysql/my.cnf and remove the “TRADITIONAL” keyword. With that removed (reload or restart MariaDB after making the change), MariaDB will not have any problems with the WordPress schema.
so without changing the tables schema, i still can take advantage of Aria as my engine if i set the sql_mode correctly?
Ahhh, ok, yes, if you want to use the Aria storage engine you’ll have to add ENGINE=ARIA statements to the schema create table statements. Without specifying the engine it will use the default storage engine, which is InnoDB (just like in MySQL).
I had to do a slightly different command to log into MariaDB. In the terminal type
mysql -u root -p
This is just a small note for newbies like me. Otherwise it worked for MariaDB 5.5 on Ubuntu 12.04 for me.