Understand the default MySQL configuration
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 "/opt/bitnami/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.
Default MySQL user accounts and privileges
The grant tables define the initial MySQL 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.
In order to see which MySQL version your system is running, execute the following command:
$ mysqld --version
The default port for MySQL is 3306.
MySQL configuration file
The MySQL configuration file is located at one of the following locations, on the MySQL database server host:
- For Bitnami installations following Approach A (using Linux system packages): /opt/bitnami/mysql/conf/my.cnf
- For Bitnami installations following Approach B (self-contained installations): /opt/bitnami/mysql/my.cnf
The MySQL official documentation has more details about how to configure the MySQL database.
MySQL log file
The log-error file contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running. If mysqld 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 MySQL database server host:
- For Bitnami installations following Approach A (using Linux system packages): /opt/bitnami/mysql/logs/mysqld.log
- For Bitnami installations following Approach B (self-contained installations): /opt/bitnami/mysql/data/mysqld.log