After updating bind-address in /etc/msql/my.cnf file MySQL stops working

May 29, 2018 121 views
DNS MySQL

I did everyting according to this tutorial, https://www.digitalocean.com/community/tutorials/building-for-production-web-applications-deploying#set-up-database-server and all the nameserver (app1, etc) resolve properly. When i now bind the adress in the mysql config and i restart the mysql server, ill get an error

● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Tue 2018-05-29 19:06:08 UTC; 3min 41s ago
Process: 14636 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 14669 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

May 29 19:05:38 DB1 systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
May 29 19:06:08 DB1 /etc/init.d/mysql[15402]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/...ed in
May 29 19:06:08 DB1 mysql[14669]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . ...ailed!
May 29 19:06:08 DB1 systemd[1]: mysql.service: control process exited, code=exited status=1
May 29 19:06:08 DB1 systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
May 29 19:06:08 DB1 systemd[1]: Unit mysql.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


~# journalctl -xn
-- Logs begin at Tue 2018-05-29 19:00:42 UTC, end at Tue 2018-05-29 19:06:54 UTC. --
May 29 19:06:08 DB1 /etc/init.d/mysql[15402]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysql
May 29 19:06:08 DB1 /etc/init.d/mysql[15402]:
May 29 19:06:08 DB1 mysql[14669]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . .
May 29 19:06:08 DB1 sudo[14631]: pam_unix(sudo:session): session closed for user root
May 29 19:06:08 DB1 systemd[1]: mysql.service: control process exited, code=exited status=1
May 29 19:06:08 DB1 systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit mysql.service has failed.

-- The result is failed.
May 29 19:06:08 DB1 systemd[1]: Unit mysql.service entered failed state.
May 29 19:06:54 DB1 sshd[15406]: Invalid user video from 130.211.63.22
May 29 19:06:54 DB1 sshd[15406]: inputuserauthrequest: invalid user video [preauth]
May 29 19:06:54 DB1 sshd[15406]: Connection closed by 130.211.63.22 [preauth]
lines 1-18/18 (END)

1 Answer

https://www.digitalocean.com/community/questions/after-updating-bind-address-in-etc-msql-my-cnf-file-mysql-stops-working

Did NOT help me tho

root@DB1:~# sudo service mysql stop
root@DB1:~# service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: inactive (dead) since Tue 2018-05-29 19:15:22 UTC; 6s ago
Process: 15956 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 15420 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)

May 29 19:13:24 DB1 mysql[15420]: Starting MySQL database server: mysqld ..
May 29 19:13:24 DB1 mysql[15420]: Checking for tables which need an upgrade, are corrupt or were
May 29 19:13:24 DB1 mysql[15420]: not closed cleanly..
May 29 19:13:24 DB1 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
May 29 19:13:24 DB1 /etc/mysql/debian-start[15847]: Upgrading MySQL tables if necessary.
May 29 19:13:24 DB1 /etc/mysql/debian-start[15861]: Checking for insecure root accounts.
May 29 19:13:24 DB1 /etc/mysql/debian-start[15866]: Triggering myisam-recover for all MyISAM tables
May 29 19:15:21 DB1 systemd[1]: Stopping LSB: Start and stop the mysql database server daemon...
May 29 19:15:22 DB1 mysql[15956]: Stopping MySQL database server: mysqld.
May 29 19:15:22 DB1 systemd[1]: Stopped LSB: Start and stop the mysql database server daemon.
root@DB1:~# sudo nano /etc/mysql/my.cnf
root@DB1:~# service mysql start
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
root@DB1:~#

Have another answer? Share your knowledge.