Jump to content

[SOLVED] How to change MySQL engine on Prestashop 1.6


Recommended Posts

One of my Prestashop's was still running version 1.4.10 until very recently (less then 2 months ago) and I upgrade it to version 1.6.x (now 1.6.0.9).

 

After the upgrade I noticed that the table MySQL engine was kept the same, it was MyISAM before and still is after the upgrade.

 

I want to change it to InnoDB but there's no option on Prestashop backoffice to do so (the was such an option on previous versions but it doesn't exist anymore on Prestashop 1.6).

 

My question is, how can I do it?

 

I know how to go to the tables (using phpmyadmin) and change it there (one by one).

I also identified one configuration file where the database MySQL engine is mentioned (config/settings.inc.php).

 

 

Is that just it?

Can I just change all the tables using phpmyadmin and change also the setting on that file and I am done?

 

 

 

Thank you in advance for your kind help.

 

 

PrestaShop version 1.6.0.9

 

SERVER INFORMATION

Server information Linux #1 SMP Mon Dec 9 18:53:52 CET 2013 x86_64

Server software version Apache

PHP version 5.3.3

Limite de memória 512M

Tempo máximo de execução 1200

 

 

DATABASE INFORMATION

MySQL version 5.1.73

MySQL server: localhost

MySQL name: CONFIDENTIAL-INFO

MySQL user: CONFIDENTIAL-INFO

Tables prefix pss_

MySQL engine MyISAM

Edited by Funny-Cat WebShop (see edit history)
Link to comment
Share on other sites

create php file with this code (example: run.php)

<?php
// connect database
    $dbhost = 'localhost';
    $dbuser = 'root';
    $dbpass = 'root';
 
    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
    $dbname = 'databasename';
    mysql_select_db($dbname);
 
// code here 
    $sql = "SHOW tables";
    $rs = mysql_query($sql);
    while($row = mysql_fetch_array($rs))
    {
        $tbl = $row[0];
        $sql = "ALTER TABLE $tbl ENGINE=INNODB";
        mysql_query($sql);
    }
?>

* change dbuser, dbpass, and dbname with yours, and then execute the file
** please backup your database before

  • Like 2
Link to comment
Share on other sites

Thank you again for your input indobusana

 

 

I run the Prestashop stores on a dedicated server and I do full server backups every night at the middle of the night (Plesk backup manager) and database backups of the Prestashop databases every morning (very early morning) so I should be fine.

 

 

Next morning I am going to try it and will inform how it went.

Link to comment
Share on other sites

×
×
  • Create New...