Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
14
Help us understand the problem. What is going on with this article?

More than 5 years have passed since last update.

@cs_sonar

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

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

14
Help us understand the problem. What is going on with this article?
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
14
Help us understand the problem. What is going on with this article?