Configuring the Database

Liferay supports many databases, like MySQL, MariaDB, or PostgreSQL. By default, a Liferay bundle uses an embedded HSQL database appropriate for demo purposes. For production use, you must use a separate database. See configuring a database to learn more.

Running MariaDB in Docker

  1. Run this command to download and run a MariaDB image automatically:

    docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:10.7
    
  2. Sign into the database server.

    docker exec -it some-mariadb bash -c "/usr/bin/mysql -uroot -pmy-secret-pw"
    
  3. Create a database to be used by the cluster.

    create database dxp_db character set utf8;
    
  4. Verify the creation of the database with the following command:

    show databases;
    

    A list of databases appears, including the dxp_db database.

Next, you’ll configure Elasticsearch.

Relevant Concepts

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy