laravel – Connect to docker mysql through Sequel Pro mac

laravel – Connect to docker mysql through Sequel Pro mac

I encounter this question too.
the why of dealing with this problem is to change your database_host to the name you had given in docker-compose.yml

for example:

this.connection = mysql.createConnection({
    host: db || 127.0.0.1,
    user: root,
    password: 123,
    database: CHIRINOS,
    port: 3306
});

here db in host is your database name of docker container

laravel – Connect to docker mysql through Sequel Pro mac

Leave a Reply

Your email address will not be published.