23
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EC-CUBE 2系のインストールでmysqlのエラーが出た

Last updated at Posted at 2016-03-23

ちょっとEC-CUBE 2系を使ってみたくなったのでインストールを実行してみたら
DBの接続設定後の次の画面で以下のエラーが出た。

mysqlは5.7.9
ec-cubeは2.13.5

Fatal error: DB処理でエラーが発生しました。 SQL: [SET SESSION storage_engine = InnoDB] MDB2 Error: unknown error _doQuery: [Error message: Could not execute statement] [Last executed query: PREPARE mdb2_statement_mysql_1b92dgf5ds8728fdsc229e74bdd0fcf FROM 'SET SESSION storage_engine = InnoDB'] [Native code: 1193] [Native message: Unknown system variable 'storage_engine'] in /home/hogehoge/data/class/SC_Query.php on line 1095

SET SESSION storage_engine = InnoDBの実行時に以下のエラーで実行できないよう

[Native message: Unknown system variable 'storage_engine']

多分mysql5.7からは上記の設定がなくなってるみたい。
インストールプログラムをトレースして以下の部分を修正して解決。

/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.phpの363行目

$objQuery->exec('SET SESSION storage_engine = InnoDB');
↓
$objQuery->exec('SET SESSION default_storage_engine = InnoDB');

というかmysql5.7ならデフォルトのエンジンはInnoDBだった気がする。

23
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?