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
Spryker works only with MySQL version 5.7 or higher.
Adjust Spryker to run with MySQL
To run the Spryker Demoshop with MySQL, adjust the following parts in your configs:
- In
config/Shared/config_default.php
, 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];
- In
deploy/setup/params.sh
, modifyDATABASE_DEFAULT_ENGINE
tomysql
:
DATABASE_DEFAULT_ENGINE='mysql'
- Install Spryker with MySQL:
vendor/bin/install
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 must 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