Skip to main content
Version: 8.8.x

Database Creation

MySQL​

  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;

    COMMERCEDB is the default schema name used by Self-Managed Commerce.

  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 Self-Managed Commerce.

Table Name Case Sensitivity​

On Unix systems, table names in SQL (Structured Query Language) queries may be case sensitive.

To turn off case sensitivity, add the line lower_case_table_names under the section [mysqld] in the /etc/mysql/my.cnf file.

Setting Transaction Isolation Level​

You must set the transaction isolation level to READ_COMMITTED.

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

Oracle​

In Oracle databases, a database schema is mapped to a user account, so we only need to create a user account for Self-Managed Commerce.

  1. Start the SQL*Plus database client by entering the following command:

    sqlplus /nolog
  2. Connect to the database as the SYS user:

    conn / as sysdba
  3. In SQL*Plus, create a database user account.

    create user COMMERCEDB identified by ep;

    COMMERCEDB/ep is the default username/password combination used by Self-Managed Commerce.

  4. Grant the user appropriate permissions.

    grant connect, resource, dba to COMMERCEDB;
  5. Exit SQL*Plus by running: exit

Pushing Database Changes​

Elastic Path recommends using the Data Population Command Line Interface (CLI) to push schema changes and catalog data updates to the production database. This tool is built in the extensions/data-population/ext-data-population-cli project.

The deployment package created by the extensions/packager/ext-deployment-package project contains the Data Population CLI as well as all the Liquibase change sets and the Import/Export data sets needed for deployment. For each target database, the following configuration files are required:

PropertyDescription
database.propertiesDefines database connection properties and the data population environment name itself for this environment.
data-population.propertiesDefines properties required by the Data Population tool for execution in this environment; e.g. Liquibase contexts to activate for this environment.
filtering.propertiesDefines the values used when overriding property placeholders in data files for this environment.

Further reading​