Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 66123  / 3 Years ago, thu, july 8, 2021, 7:44:17

I installed MySQL, and changed the configuration so the databases are stored on a separate hard drive. In the process MySQL has stopped starting up automatically. When I start the computer, I need to run the command:



sudo service mysql start


to get MySQL to run. How do you get MySQL to start on boot?


More From » startup

 Answers
4

Excuse me for being a bit off-topic by hijacking the slightly different issue here to provide solution to similar case. Since I stumbled over this thread by trying to solve my somewhat related issue I beg for your pardon.



I was having issues with starting mysql in an lxc container running Ubuntu 16.04. I tried update-rc.d mysql defaults as well as systemctl enable mysql.service several times but mysql didn't come up on boot. There wasn't even a log entry regarding some error to fix.



The lxc container is getting its network configuration via host's lxc configuration file but still was configured to start DHCP client enabled by default. By disabling DHCP in lxc container I stumbled over solution by accident. This was the reason for mysql not starting as it was waiting for DHCP client to finish. And DHCP didn't finish due to missing any response from unavailable DHCP service.



So, just in case you stumble over the same question here and find yourself in a similar dilemma try this: Edit /etc/network/interfaces and comment-out lines reading



auto eth0
iface eth0 inet dhcp

[#27135] Friday, July 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laiuct

Total Points: 44
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Feb 15, 2021
3 Years ago
;