Mysql wont Start

by | Apr 14, 2023 | IT Tips | 0 comments

Ubuntu 22.04 with mysql-server 8.0.32-0ubuntu0.22.04.2

mysql wouldn't start with error

sudo systemctl status mysql.service
# output 
Error: 99 (Cannot assign requested address)

Cause

I was using Docker on this host and had added the the Docker network host IP Address to mysqld.cnf to allow connection from Docker containers and after removing Docker 172.17.0.1 was no longer a valid address

My /etc/mysql/mysql.conf.d/mysqld.cnf had the following in it

bind-address                   = 127.0.0.1,172.17.0.1
mysqlx-bind-address     = 127.0.0.1,172.17.0.1

Fix

bind-address                   = 127.0.0.1
mysqlx-bind-address     = 127.0.0.1

Restart mysqld

sudo systemctl start mysql.service

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.