Ubuntu 22.04 with mysql-server 8.0.32-0ubuntu0.22.04.2
mysql wouldn't start with error
1 2 3 | 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
1 2 | bind-address = 127.0.0.1,172.17.0.1 mysqlx-bind-address = 127.0.0.1,172.17.0.1 |
Fix
1 2 | bind-address = 127.0.0.1 mysqlx-bind-address = 127.0.0.1 |
Restart mysqld
1 | sudo systemctl start mysql.service |
0 Comments