3

I am currently trying to setup a Prestashop 1.7 instance using Google Cloud Compute Engine and Google Cloud SQL (MySQL 5.7).

I managed to get to the installation page of Prestashop, but when I try to connect it to Cloud SQL, I get the following error:

    Your database login does not have the privileges to create table on 
    the database "prestashop". Ask your hosting provider:
    Storage engine MyISAM is disabled (Table creation is disallowed).

I spent a lot of time on this and I can't get it to work. I understand that Prestashop uses InnoDB as a default SQL engine, and so does Cloud SQL.

That's why I don't really understand the source of this error.

Thanks for your help !

Thien42
  • 31
  • 2

1 Answers1

4

had the same problem here, took me one day of debugging... Looks that prestashop guys did not check everything while transitioning to InnoDB.

To make in short: vi ./classes/db/DbPDO.php

and in

public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine = null)

Look for:

if ($engine === null) {
        $engine = 'MyISAM';
    }

and patch like this:

if ($engine === null) {
        $engine = 'InnoDB';
    }

Hope it will work also for you.

Best whishes

  • 1
    Thanks for this, Alberto! I'm spinning it up in Kubernetes and ran into this issue. It would be great if the folks at PrestaShop could update their Docker container – jmvbxx May 23 '18 at 22:52
  • 2022 and this issue is still present, you saved my day @alberto-viale – kR105 Mar 14 '22 at 04:20