I am running LAMP environment with MYSQL 5.6.38 and Cakephp 2.4.6 in WHM/Cpanel. I am facing high TTFB 400-500ms on my website, I have been told that MariaDB 10.x will fix MYSQL performance issues?
Is this true? if I go ahead and fork upgrade to MariaDB, will it break my website because I am running cakephp 2.4.6? if it did how can I downgrade to MYSQL 5.6.38?
2
Answers
As far as I know you should be fine with upgrading to MariaDB.
I can make no comment with regards to performance improvements, that you’d have to test out.
Suggested steps:
Put your site if offline mode so nobody can read the database any more. (You can use for example
.htaccess
to Deny From all)Export your MySQL database using
mysqldump
utility.Import what you just exported into MariaDB (I assume you have this installed and working)
In CakePHP app.php file you need to change the database connection parameters to connect to MariaDB instead. (Likely different port, username and password).
Get your site online again and do some tests.
Rolling back is as easy as changing the DB connection in app.php to connect back to MySQL.
Assuming you have Maria DB working you need to change your database.php file, set the "port" parameter to Maria DB’s port…
The default port for Maria DB is 3307 but you can check it in WAMP by clicking the wamp icon and then going to Maria DB option, then you’ll be able to see which port is being used…
Below you can see how your database.php should look like to work fine with Maria DB.
Hope it helps somebody.