Elastic Path Commerce Development

Creating the Database in MySQL 5.x

Creating the Database in MySQL 5.x

Creating the Database

  1. In the command prompt, open MySQL:
    mysql -u root -p
  2. In MySQL, enter the following command to create a database:
    create database COMMERCEDB character set utf8;

    When starting fresh with Elastic Path 7.5.1, it is recommended you name the database schema COMMERCEDB. This will make configuring Liquibase simpler, as this has been set as the default.

  3. Enter the following command to create a user that has complete access to COMMERCEDB:
    grant all privileges on COMMERCEDB.* to ep@'localhost' identified by 'ep';

    ep/ep is the default username/password combination used by Elastic Path.

Table Name Case Sensitivity

On Unix systems, table names in SQL queries may be case sensitive. To turn off case sensitivity, refer to the MySQL reference manual here:http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.htmlIn most cases this means adding the line lower_case_table_names under the section [mysqld] in /etc/mysql/my.cnf.

Setting Transaction Isolation Level

You must change the transaction isolation level of MySQL database from the current default setting REPEATABLE_READ to READ_COMMITTED to avoid optimistic locks.

To change the level, add transaction_isolation=READ-COMMITTED line under the section [mysqld] in the /etc/mysql/my.cnf file and restart the database server.