skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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.

    public $default = array(
        'datasource' => 'Database/Mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'port' => 3307, // Your Maria DB port, the default port is 3307
        'password' => '',
        'database' => 'MyDataBase',
        'prefix' => '',
        //'encoding' => 'utf8',
    );
    

    Hope it helps somebody.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search