nativeInstallerdreamfactory

Understand the default MariaDB configuration

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "installdir/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.


NOTE: We are in the process of modifying the configuration for many Bitnami stacks. On account of these changes, the file paths and commands stated in this guide may change depending on whether your Bitnami stack uses MySQL or MariaDB. To identify which database server is used in your stack, run the command below:

 $ test -d installdir/mariadb && echo "MariaDB" || echo "MySQL"

The output of the command indicates which database server (MySQL or MariaDB) is used by the installation, and will allow you to identify which guides to follow in our documentation for common database-related operations.

Default MariaDB user accounts and privileges

The grant tables define the initial MariaDB user accounts and their access privileges. The default configuration consists of:

  • A privileged account with a username of root. The root user has remote access to the database.
  • An anonymous user without remote access to the database server. This user can only connect from the local machine and it is only intended for testing.
  • A test database only intended for testing.

Check our recommendations for a production server.

MariaDB version

In order to check the MariaDB version, execute the following command:

$ mysqld --version

MariaDB port

The default port for MariaDB is 3306.

MariaDB configuration file

The MariaDB configuration file is located at one of the following locations, on the MariaDB database server host:

  • For Bitnami installations following Approach A (using Linux system packages): installdir/mariadb/conf/my.cnf
  • For Bitnami installations following Approach B (self-contained installations): installdir/mariadb/my.cnf

The MariaDB official documentation has more details about how to configure the MariaDB database.

MariaDB log file

The log-error file contains information indicating when MariaDB was started and stopped and also any critical errors that occur while the server is running. If MariaDB notices a table that needs to be automatically checked or repaired, it writes a message to the error log.

Find it at one of the following locations, on the MariaDB database server host:

  • For Bitnami installations following Approach A (using Linux system packages): installdir/mariadb/logs/mysqld.log
  • For Bitnami installations following Approach B (self-contained installations): installdir/mariadb/data/mysqld.log
Last modification October 21, 2020