Migrations: DB-Connection not possible with non-default port for db


#1

Hello,

I set up a DB-Connection via DSN (env-variable) with a non-default-port (3307) for mysql/mariadb. Cakephp connects successfully. Works. Everything fine. It’s the default connection.

When I use the Migration-Class and pass the default-connection via the constructor, the Migrations can’t connect to db (refused). When I change the db-port to 3306, it works again. Switched back - no connection.

What can I do to make it work, or is this a bug in class?

Thanks!


#2

At last friday, me and hmic solved my error. I just got screwed up with the docker-compose-file (port host:container). Sometimes you don’t see your error yourself alone…

So to clean up: CakePHP and sphinx did everything correctly. Also the transport the mysql-port correctly down to the core libs. It was myself who did the mistake and blame cake/shpinx for the unexpected behaviour…

So please ignore my thread or learn to step one way back, talk a walk or a ride to get yourself free in mind and then think about what you’ve done :wink: