Connect to MySQL

For Multi-Tier Solutions without Amazon RDS, you can connect to the database from the same computer where it is installed with the mysql client tool.

$ mysql -u root -p

For Multi-Tier Solutions with Amazon RDS, use the command below instead. Replace the HOSTNAME placeholder with the actual hostname for the Amazon RDS instance (more information).

$ mysql -u root -h HOSTNAME -p

You will be prompted to enter the root user password. This is the same password entered during the server deployment process.

WordPress users can also obtain the database hostname by executing the following command:

$ sudo cat /opt/bitnami/wordpress/wp-config.php | grep 'DB_HOST'
Last modification June 8, 2020