SSH tunnel options
You can use an SSH tunnel to connect to database from an external app (for example MySQL Workbench, HeidiSQL or PHPStorm)
- Uncomment ports directive in database service in
docker-compose.yml
ports:
- 127.0.0.1:${SSH_TUNNEL_EXT_PORT}:3306
- Edit the
.env.main
file, findSSH_TUNNEL_EXT_PORT
– make sure that the port is unique. If you are using multiple instances, change the port value. - Open your database management app and configure SSH tunnel, database connection
phpMyadmin options
To use phpMyadmin need to run the phpMyadmin container first. It’s not running by default.
- Edit the
.env.main
file, findPMA_EXT_PORT
– make sure that the port is unique. If you are using multiple instances, change the port value. - Run phpMyadmin container:
make pma
- Open the
your-app-domain.com:PMA_EXT_PORT
URL in the browser to access phpMyadmin. For example, we usePMA_EXT_PORT=8801
. Openyour-app-domain.com:8801
⚠️ WARNING 📣 Do not use phpMyadmin on public (production or open stage), it’s not secure!
Reset database root password
- In
docker-compose.yml
file uncommentcommand: --skip-grant-tables
in mariadb service - Restart containers:
make restart
- Enter inside mariadb container:
make exec mariadb
- Inside container run:
mariadb> FLUSH PRIVILEGES; ALTER USER 'root'@'%' IDENTIFIED BY 'new_password';
Where ‘new_password’ – new root password
You can reset another database user password too – just change the username, host, and add new password.
For example, there are two root
users in database – with %
host and with localhost
. Use this command to see all users:
SELECT User, Host FROM mysql.user;
- Revert back changes in
docker-compose.yml
- Restart containers:
make restart