Score:0

Mysql server won't start after changing bind-address

cn flag

I have two dropplets at digitalocean, one is for http server and another is for database.

In mysql config /etc/mysql/mysql.conf.d/mysqld.cnf I have set bind-address to digitalocean private ip and everithing was working without the errors.

After server was rebooted, mysql failed to start. After I change bind-address to 127.0.0.1 it was working again, but my php app could not connect to the database.

Just to be clear, this kind of set up was working fine atfer server reboot.

us flag
Are you sure the private IP was the same after reboot?
sitemapxml avatar
cn flag
No, it was automatically changed to 127.0.0.1
sitemapxml avatar
cn flag
So I have changed it again, mysql failed to start, change back to localhost and it is working, except I have no access to database. This was a bug in old mysql versions, but I use mysql 8.0.25
jm flag
`127.0.0.1` is the localhost IP address and is not set by DHCP. Use `ip a` to find out the IP that your server picked up on reboot.
jm flag
Or you can set the bind-address to `0.0.0.0` to listen on all IPv4 interfaces.
sitemapxml avatar
cn flag
I tried, but whatever ip I set except `127.0.0.1` it throws an error. It seems as a bug.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.