PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 6, 2022

[FIXED] Migrating from MYSQL to MariaDB with cakephp 2.4.6

 January 06, 2022     cakephp, mariadb, mysql     No comments   

Issue

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?


Solution

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:

  1. Put your site if offline mode so nobody can read the database any more. (You can use for example .htaccess to Deny From all)

  2. Export your MySQL database using mysqldump utility.

  3. Import what you just exported into MariaDB (I assume you have this installed and working)

  4. In CakePHP app.php file you need to change the database connection parameters to connect to MariaDB instead. (Likely different port, username and password).

  5. Get your site online again and do some tests.

  6. Rolling back is as easy as changing the DB connection in app.php to connect back to MySQL.



Answered By - Ilie Pandia
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing