Version: Edit on GitHub

Database Setup

Pimcore requires a standard MySQL database, the only thing you should assure is that the database uses utf8mb4 as character set.
If you create a new database just set the character set to utf8mb4.

Note: You have to create the database manually before you can continue with the web-based installer, which automatically creates the underlying database schema for Pimcore.

Command to Create a new Database

mysql -u root -p -e "CREATE DATABASE project_database charset=utf8mb4;"

Permissions needed for Pimcore

Pimcore requires all permissions on database level. You can create a user with the necessary rights with the following commands:

CREATE USER 'project_user'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL ON `project_database`.* TO 'project_user'@'localhost';

Database Server Configuration (Optional)

While setting up the MySQL Server you can enforce utf8mb4 character set and lower case table names by placing a pimcore.cnf file with the following contents into the server config directory (e.g. /etc/mysql/conf.d/). Refer to the server configuration manual applicable to your environment to determine the location of the server config directory.

# MySQL Server configuration for Pimcore.
# @See
# @See

# Applies to any client connecting to this sever

# Applies to mysql cli client application

# Applies to mysql server
init-connect='SET NAMES utf8mb4'

Setting lower_case_table_names=1 makes sure that tables for Pimcore classes are created in lower case even though their class names contain capital letters.