Feature #7574
closedmyamiweb database does not set database port
0%
Description
We are setting up Leginon using a managed DB service we run on site. The database is on a non-standard port (not 3306).
This test works:
php -r "mysql_connect('niftydb:12345', 'usr_object', 'usr_pass', 'leginondb'); echo mysql_stat();"
Uptime: 2574466 Threads: 7 Questions: 250 Slow queries: 0 Opens: 37 Flush tables: 1 Open tables: 31 Queries per second avg: 0.000
But the database initialization done through the setup website fails with a message saying something in wrong with the hostname, username, or password.
I took a look into the code and I find that you are using the older 'mysql' as well as newer 'mysqli' code. It looks like the older mysql code took "host:port" as the hostname and worked, but mysqli wants the port as a separate parameter when a new object is created.
I'm not certain this is the issue, but that's my best guess. I am unable to find php logs anywhere, and no errors were displayed in the browser, despite being set for display_errors = On.