Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

ちょっと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だった気がする。

cs_sonar
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした