Cara mengetahui password root MySQL EasyEngine

Pada versi EasyEngine 4 dan terbaru, semua aplikasi EasyEngine webserver, database dan PHP dijalankan di dalam image container Docker. Jadi untuk dapat mengaksesnya bisa dengan perintah docker-compose.

Bagaimana cara mengetahui password root MySQL dan login ke MySQL console? jalankan perintah berikut

cd /opt/easyengine/services && docker-compose exec global-db bash -c 'echo ${MYSQL_ROOT_PASSWORD}'
Code language: PHP (php)

Atau juga bisa

grep 'MYSQL_ROOT_PASSWORD' /opt/easyengine/services/docker-compose.yml
Code language: JavaScript (javascript)

Hasilnya:

- MYSQL_ROOT_PASSWORD=Nn40RGx5T6mF

Cara masuk ke MySQL console

cd /opt/easyengine/services && docker-compose exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}'
Code language: PHP (php)

Hasilnya:

Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 15 Server version: 10.5.4-MariaDB-1:10.5.4+maria~focal-log mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
Code language: JavaScript (javascript)

Tinggalkan komentar