MySQL on boot

Kernels & Hardware, configuring network, installing services

MySQL on boot

Postby neon » 2016-06-14 21:13

Hi all,

I've had a look around online and searched this forum but don't seem to be able to find an answer to my question.
I'm running a Debian 8 server. Several sites are running on the machine, the set-up is nginx, php-fpm & MySQL.
Now I have an odd issue with MySQL. When the server gets shutdown or rebooted (be it intentionally or via power cut), upon starting itself up MySQL refuses to start.

Running "service mysql status" gives me the following:

● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Tue 2016-06-14 22:06:32 BST; 18min ago
Process: 640 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Jun 14 22:06:32 zeus mysql[640]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Jun 14 22:06:32 zeus systemd[1]: mysql.service: control process exited, code=exited status=1
Jun 14 22:06:32 zeus systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Jun 14 22:06:32 zeus systemd[1]: Unit mysql.service entered failed state.

Checking the mysql.err log I find the following:

160614 22:06:03 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
160614 22:06:03 [ERROR] Do you already have another mysqld server running on port: 3306 ?
160614 22:06:03 [ERROR] Aborting

Now I have nothing else running on port 3306, and the most peculiar thing is as soon as the machine is booted I can start MySQL with the "service mysql start" command.

Does anyone please have any suggestions, as it is incredibly annoying having to restart it all the time.
I am aware I could write a script, but I'd rather the service just started on boot like it supposed to.

Any help would be greatly appreciated (I am happy to disclose the whole mysql.err if required).
Many thanks!
Posts: 1
Joined: 2016-06-14 20:30

Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests