MySQL 8 on CentOS 7 – after update to 8.0.16-1, service won’t start

centos7MySQL

This morning, I updated MySQL as there was an update available, but since then, the service won't start.

Below is a screen grab from the output from systemctl status mysqld.service – the error seems to be "no such file or directory", but I can see the data…

The output from systemctl status mysqld.service

From mysqld.log

2019-04-29T07:52:12.107195Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mo$
2019-04-29T07:52:12.110473Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 7100
2019-04-29T07:52:12.113297Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please$
2019-04-29T07:52:12.113317Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate $
2019-04-29T07:52:19.927908Z 4 [System] [MY-013381] [Server] Server upgrade from '80015' to '80016' started.
2019-04-29T07:52:31.456525Z 4 [System] [MY-013381] [Server] Server upgrade from '80015' to '80016' completed.
2019-04-29T07:52:45.173350Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-04-29T07:52:45.195659Z 0 [ERROR] [MY-010270] [Server] Can't start server : Bind on unix socket: Address already in use
2019-04-29T07:52:45.195686Z 0 [ERROR] [MY-010258] [Server] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
2019-04-29T07:52:45.196385Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-04-29T07:52:47.560115Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16)  MySQL Community Server - GPL.
2019-04-29T07:55:48.983870Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mo$
2019-04-29T07:55:48.986909Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 3667
2019-04-29T07:55:49.229362Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please$
2019-04-29T07:55:49.229394Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate $
2019-04-29T07:58:43.922205Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mo$
2019-04-29T07:58:43.924734Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 4362
2019-04-29T07:58:43.927787Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please$
2019-04-29T07:58:43.927807Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate $
2019-04-29T07:58:45.734055Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-04-29T07:58:45.739086Z 0 [ERROR] [MY-010270] [Server] Can't start server : Bind on unix socket: Address already in use
2019-04-29T07:58:45.739110Z 0 [ERROR] [MY-010258] [Server] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
2019-04-29T07:58:45.739676Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-04-29T07:58:47.828539Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16)  MySQL Community Server - GPL.
2019-04-29T08:21:45.104646Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mo$
2019-04-29T08:21:45.108410Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 4826
2019-04-29T08:21:45.111420Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please$
2019-04-29T08:21:45.111440Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate $
2019-04-29T08:21:49.874453Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-04-29T08:21:49.891328Z 0 [ERROR] [MY-010270] [Server] Can't start server : Bind on unix socket: Address already in use
2019-04-29T08:21:49.891353Z 0 [ERROR] [MY-010258] [Server] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
2019-04-29T08:21:49.892014Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-04-29T08:21:52.722060Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16)  MySQL Community Server - GPL.

I've tried un-installing the update (but found a line in the mysqld.log that says 'downgrade not avialable'.
I've tried deleting ib_logfile0 & ib_logfile1 as suggested in another forum.

Please help…

EDIT:

I've tried the solution from MySQL PID file missing (as I couldn't see a pid file), so did:

chmod 0777 /var/lib/mysql/ib_logfile0
chmod 0777 /var/lib/mysql/ib_logfile1
chown -R mysql:root /var/lib/mysql

The error has changed – below is the updated output from systemctl status mysqld.service

[root@360loa5 mysql]# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2019-04-29 09:21:52 BST; 7min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 4826 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 4807 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 4826 (code=exited, status=1/FAILURE)
   Status: "SERVER_BOOTING"
    Error: 98 (Address already in use)

Apr 29 09:21:44 360loa5.360ss.com systemd[1]: Starting MySQL Server...
Apr 29 09:21:52 360loa5.360ss.com systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Apr 29 09:21:52 360loa5.360ss.com systemd[1]: Failed to start MySQL Server.
Apr 29 09:21:52 360loa5.360ss.com systemd[1]: Unit mysqld.service entered failed state.
Apr 29 09:21:52 360loa5.360ss.com systemd[1]: mysqld.service failed.

In the output from

sudo netstat -lntup

there isn't anything listed for port 3306…

Best Answer

In the end, the fix was just to:

mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
Related Topic