Funny-Cat WebShop Posted August 20, 2014 Share Posted August 20, 2014 (edited) 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 August 22, 2014 by Funny-Cat WebShop (see edit history) Link to comment Share on other sites More sharing options...
duredo Posted August 20, 2014 Share Posted August 20, 2014 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 2 Link to comment Share on other sites More sharing options...
Funny-Cat WebShop Posted August 21, 2014 Author Share Posted August 21, 2014 Hi indobusana, Thank you for your answer and help. My question was more on the line of... 'is this the only thing that needs to be done'? Seems too simple, and I am basically afraid of doing it without input/confirmation from Prestashop users and or specialists. Have you done it? Link to comment Share on other sites More sharing options...
duredo Posted August 21, 2014 Share Posted August 21, 2014 yes, I've done it. So far so good. I'm not MySQL specialist, so I just do trial and error, thats why always backup first Link to comment Share on other sites More sharing options...
Funny-Cat WebShop Posted August 21, 2014 Author Share Posted August 21, 2014 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 More sharing options...
Funny-Cat WebShop Posted August 22, 2014 Author Share Posted August 22, 2014 Thanks again for your help, all went well and its up and running just fine.Used your php code and edited the settings.inc.php Link to comment Share on other sites More sharing options...
duredo Posted August 22, 2014 Share Posted August 22, 2014 your welcome, you can edit this thread to Solved Link to comment Share on other sites More sharing options...
Funny-Cat WebShop Posted August 22, 2014 Author Share Posted August 22, 2014 been trying to guess how to do that all morning but haven't figured out how.Marked it as solved clicking on the "Mark Solved" box on your reply but other that I got no luck on how to put the [solved] thingie on the topic title. Link to comment Share on other sites More sharing options...
Funny-Cat WebShop Posted August 22, 2014 Author Share Posted August 22, 2014 Just found it. Use "Full Editor" and shows the topic title again so we can edit it. Link to comment Share on other sites More sharing options...
Recommended Posts