I recently set up a mysql innodb cluster, and have configured mysqlrouter to sit in front of it.
On my PHP applications, if I change the port from 3306 to 6446, the application hangs when it tries to connect to the DB. I never see any error messages. I do have one PHP application that is working on port 6446: phpmyadmin.
The mysql
commandline client works connecting to 6446.
I did find a bug that somebody filed on mysql saying that mysqlrouter doesn't support compression. If I try a connection with compression, it fails.
elyograg@gandalf:~$ mysql -h db -P 6446 --ssl-mode=required --compression-algorithms=zlib,zstd
ERROR 2066 (HY000): Connection failed due to wrongly configured compression algorithm
Because the mysql client immediately errors when trying compression, seems like if compression were the problem, web pages would immediately abort with an error, not hang.
If I try a short PHP code snippet to connect using either PDO or mysqli, it hangs indefinitely connecting to 6446 and works connecting to 3306.
Because phpmyadmin (which uses mysqli) works, I think phpmyadmin must be setting some non-default mysqli option that allows it to work connecting to 6446. I have tried finding the place in phpmyadmin where it creates the connection, but I am not very familiar with PHP code, so I haven't been able to find it.
What else can I do to troubleshoot this?