Categories
Azure Microsoft Moodle MySQL

Moodle 3.3 with MySQL SSL Connection in the Azure Cloud

Update: Microsoft Azure Database for MySQL: Use PHP (not) to Connect and Query Data article has now some new updates.

Microsoft listened to my words, so I have found a documentation how to connect to Azure Database for MySQL with PHP via SSL connection. This can be found here:
https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl

Of course this is not a complete solution because it did not work for me. So here is my solution.

Categories
LMS Microsoft Moodle MySQL

Microsoft Azure Database for MySQL: Use PHP (not) to Connect and Query Data

Back on the road of blogging again.

So our client who is a big European organization has Microsoft Azure Cloud services and having consultant company for support.

Since we would like to run Moodle we need PHP + MySQL.  We got an Ubuntu app server. Funny isn’t is to run Linux machines in the Microsoft Cloud? But I am sure they are performing better than the Windows Servers. For taking advance of the Cloud service we have been offered to use the Microsoft Azure Database for MySQL Basic solution with 50 DTU. We have been told to use SSL connection.

The problem was that there is no man on Earth who could establish an SSL connection to Microsoft Azure Database for MySQL with PHP.

Even Microsoft’s documentation how to connect MySQL with PHP is without using SSL.

Our other problem was that it was so slow that we gave up using it. A 1MB MySQL dump export took 5 minutes. In a localhost it took few seconds.

We had got the following response from the Microsoft consultant:

We took the smallest instance possible to start with, so you can expect bad performances.

This is not a bad performance, this is unusable.

Hope to have a better MySQL service later. Come on MS!

Categories
MySQL

MySQL Out of Resources Error

Checking my automated backup I realized that one of my database dump is empty. I chechked the database and it was ok. I tried a manual dump and I got this:

mysqldump: Couldn't execute 'Lock tables on `tablename`': Out of resources when opening file './databasename/tablename###.MYD' 

After some googling I found a solution. I have the following line to my.cnf

open_files_limit = 4096

then restarted MySQL everything was ok.