HowTo: Set up Spryker with MySQL
Edit on GitHubSpryker supports connecting to the MySQL database. To install a demo shop with this database, follow the instructions to adjust the configuration.
MySQL version
Currently Spryker works only with MySQL version 5.7 or higher.
Adjust Spryker to run with MySQL
To run the Spryker Demoshop with MySQL, adjust some parts in our configs:
- Go to
config/Shared/config_default.php
and modify the database configuration:
$config[PropelConstants::ZED_DB_PORT] = 3306;
$config[PropelConstants::ZED_DB_ENGINE] = $config[PropelConstants::ZED_DB_ENGINE_MYSQL];
$config[PropelQueryBuilderConstants::ZED_DB_ENGINE] = $config[PropelConstants::ZED_DB_ENGINE_MYSQL];
- Go to
deploy/setup/params.sh
and modifyDATABASE_DEFAULT_ENGINE
to MySQL:
DATABASE_DEFAULT_ENGINE='mysql'
- That’s it. Now, run
vendor/bin/install
to install Spryker with MySQL.
Configure MySQL GroupBy setting
In some MySQL servers, there is the ONLY_FULL_GROUP_BY
option which forces all columns to be present in group_by
. This option should be removed from your configurations of MySQL:
Wrong setting
[mysqld]
# server mode
sql-mode = STRICT_ALL_TABLES,ONLY_FULL_GROUP_BY
Correct setting
[mysqld]
# server mode
sql-mode = STRICT_ALL_TABLES
Thank you!
For submitting the form