EasyEngine Connect to MySQL Database

To Find MySQL root password on EasyEngine, run

cd /opt/easyengine/services && docker-compose exec global-db bash -c 'echo $MYSQL_ROOT_PASSWORD'

Or

cat /opt/easyengine/services/docker-compose.yml | grep MYSQL_ROOT_PASSWORD | awk -F'=' '{print $2}'
cat /opt/easyengine/services/docker-compose.yml | grep MYSQL_ROOT_PASSWORD | cut -d'=' -f2

To connect to MySQL console, run

cd /opt/easyengine/services && docker-compose exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}'

See EasyEngine

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *