How to convert an entire MySQL database character set and collation to UTF-8?

I found myself in need of upgrading a number of older wordpress sites to change from the old latin1_swedish_ci to UTF-8, both the character set and collation.  I utilized a command line SQL prompt to accomplish this.  Modify the appropriate parameters “test” for your database, and “yourpasswordhere” with your password, ymmv, and have fun.

I am using Fedora 21 and MariaDB 10.0.15

(echo ‘ALTER DATABASE `'”test”‘` CHARACTER SET utf8 COLLATE utf8_general_ci;'; mysql -u root –password=”yourpasswordhere” “test” -e “SHOW TABLES” –batch –skip-column-names | xargs -I{} echo ‘ALTER TABLE `'{}’` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;’ ) | mysql -u root –password=”yourpasswordhere” “test”

I don’t believe I needed to login twice; however, I was rewriting this from some notes and it worked, so I left it.  Feel free to send me the shorter code.  I always appreciate it.

Moodle “version 5.5.31 is required and you are running”

I received this error message upgrading an older Moodle installation this weekend to Fedora 21 and Moodle 2.8.2+.

Information on the forums on was less than gratifying with little or no work done to explain an answer, merely pontificate about this or that, or my favorite, ask for more information.

Many folks posted less helpful information explaining that a number of was indeed lower than 5.5.31 and one needed to upgrade to a newer version of MariaDB.  I believe that is not constructive to a community.

Others posted a link back to the Moodle Bug Report which is when an earlier and unrelated bug was dealt with.

As always, the answer is intertwined in the method of operations, the question itself, not being snarky about version numbers.

An administrator with an older site, upgrading to a newer site, usually leaves the config.php alone.  After all, how much is in there?  Usually nothing.  But with upgrades to MariaDB version 10.0 and above, one needs to change, per the Moodle documentation (which I skipped), the line regarding what database is being used from MySQL to MariaDB.  That one fix allows the version number to be read quickly and the update to proceed.

I have tried to contribute and answer the posts I found online in the event they are running into the same simple fix I had to make.  Be nice out there, your answer should resolve an issue.

Choosing the Platform

Choosing a platform upon which to teach or blog or run a server is a crucial step.  It isn’t simply that it is important to consider which is the latest and greatest, nor to discard that as often a newly developed system gives a much needed thorough housecleaning; however, it helps to consider which platform has an active and open community.

899FGTake Moodle for example, this plugin crossed my vision yesterday and I was reminded that a community that produces software because a platform allows it will always offer some advantage beyond the initial setup.

Reader: a plugin module to track and incentivize reading by students. Available for Moodle 2.x, the reviews suggest that "the gamification features make this a highly motivational tool to encourage reading for fun". Visit the site for more information

First Step After Using Fedup To Install Fedora 21

The primary problem this post addresses is removing old versions of the Kernel as Grub is apparently not booting the version it is visually confirming that it is booting.

The details are that on my first three Fedora 21 installations I used FedUp to upgraded existing Fedora installations with some unusual but simple to fix problems as a result.  The original installations were Fedora 20 and Fedora 19 so the issue seems to be within the Fedora 21 ecosystem.  While the problems were different on all machines, depending on the services the servers provided, and my primary Linux workstation, the fix was to remove old versions of the Kernel.

I used the following steps

1. Check Installed Kernels

rpm –q kernel

2.  Delete / Remove Old Kernels

yum install yum-utils

package-cleanup –-oldkernels –-count=1