-
Notifications
You must be signed in to change notification settings - Fork 97
Howto: Use Another MySQL Instance
Jeffrey Boehm edited this page Sep 5, 2019
·
1 revision
- Remove the
db
service fromdocker-compose.yml
, by removing the entire block. - Remove the
MYSQL_ROOT_PASSWORD
variable from the.env
file. - Add a
MYSQL_HOST
variable to the.env
file, change it so that it points to your MySQL host,127.0.0.1
for example. - Change
MYSQL_DATABASE
,MYSQL_USER
,MYSQL_PASSWORD
so they matches your credentials. - Import the both
.sql
files in /db/rootfs/docker-entrypoint-initdb.d.
If your MySQL instance also runs in Docker, be aware that it needs to be connected to your mail network, since docker-compose creates a new one for each project.
You can do so by executing for example docker network connect mail_default mysql
.