Page 1 of 1

Mysql/MariaDB, quirky restart after failure

PostPosted: 21. January 2019 17:07
by entwisi
hi

Have a quirky problem, occasionally after a server reboot(mandated monthly restart of the VM ) or once when we had a full disk issue the mysqld process starts but on port+1 i.e. 3307 instead of 3306. I've checked using netstat and lsof and nothing else appears to be holding 3306 so why is it falling back one port? I can't see anything in config that would suggest why this would happen?

I've got round for now that after restart I have a script that pulls the port # from the process and then updates my sites php config automatically but its a fudge and I'd rather work out why.

Thanks in advance!

Re: Mysql/MariaDB, quirky restart after failure

PostPosted: 21. January 2019 19:38
by Altrea
There is no automatical falling back port.
Either the port is changed in the configs or it does not take effect.
So the most likely scenario is that someone changed the mariadb config to port 3307 at runtime but that does not take effect because mariadb was not restarted after that.

Re: Mysql/MariaDB, quirky restart after failure

PostPosted: 21. January 2019 21:03
by entwisi
We checked my.cnf and it still said 3306. I even searched all files under the install for the text 3307 without joy.

As I said, really quirky, even a stop start of the DB wouldn't fix it it needs a full server reboot at which point it flips back to 3306.

Re: Mysql/MariaDB, quirky restart after failure

PostPosted: 21. January 2019 21:15
by Altrea
As I said, Mariadb does not roll dice for choosing listening ports.
There is no failover functionality. If the configured port is blocked Mariadb will simply not start.

Re: Mysql/MariaDB, quirky restart after failure

PostPosted: 21. January 2019 22:37
by entwisi
I can only what I see, I guess I should file a bug report next time it happens,

Any suggested debug settings beyond trying to start with trace?