Project

General

Profile

Actions

Feature #7574

closed

myamiweb database does not set database port

Added by Ben McGough over 5 years ago. Updated almost 4 years ago.

Status:
Won't Fix or Won't Do
Priority:
Low
Assignee:
Sargis Dallakyan
Category:
-
Start date:
05/23/2019
Due date:
% Done:

0%

Estimated time:
Deliverable:

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.

Actions

Also available in: Atom PDF