MySQL db refusing to start after Ubuntu 16.04.1 reboot
-
@DustinB3403 Correct. To start I used "sudo service mysql status" and this is where I discovered it wasn't running.
-
It looks to me like a dependency was removed when you upgraded.
Process: 3129 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
-
I thought that Ubuntu came with MariaDB, not MySQL. Where did you get MySQL?
-
@DustinB3403 said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
/usr/sbin/mysqld
Just checked. There is no file named "/usr/sbin/mysqld"
-
@scottalanmiller said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
I thought that Ubuntu came with MariaDB, not MySQL. Where did you get MySQL?
Installed from "sudo apt-get install mysql-server"
-
@NashBrydges said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@DustinB3403 said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
/usr/sbin/mysqld
Just checked. There is no file named "/usr/sbin/mysqld"
Did you create a user outside of root on this system? If so check under that user account.
-
@NashBrydges said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@scottalanmiller said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
I thought that Ubuntu came with MariaDB, not MySQL. Where did you get MySQL?
Installed from "sudo apt-get install mysql-server"
Oh okay, maybe they didn't switch. I run my databases on CentOS so might have missed that they hung back on MySQL.
-
@NashBrydges said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@DustinB3403 said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
/usr/sbin/mysqld
Just checked. There is no file named "/usr/sbin/mysqld"
The fact that you don't see the path means that either your running under the wrong account (don't have permission) or that something was removed.
-
@DustinB3403 I created a new user with select, update, insert delete privs on a new database within mysql but there nothing under any other users anywhere. I've been using this user for the past 2 days and it worked well.
I should mention that mysql is running on the standard port and nothing has been changed on the mysqld.cnf file.
-
Can you try this...
sudo apt-get install apparmor-profiles apparmor-profiles-extra apparmor-docs apparmor-utils
See if that does anything?
-
@DustinB3403 said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@NashBrydges said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@DustinB3403 said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
/usr/sbin/mysqld
Just checked. There is no file named "/usr/sbin/mysqld"
The fact that you don't see the path means that either your running under the wrong account (don't have permission) or that something was removed.
The root account still existed in the mysql.user table, along with the debian maintenance account that is setup during install. I added a new underpriviledged user to the mysql.user table but not to the server. Thatis still running under the only account that exists.
-
@scottalanmiller said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
Can you try this...
sudo apt-get install apparmor-profiles apparmor-profiles-extra apparmor-docs apparmor-utils
See if that does anything?
This did install additional packages but mysql service still isn't starting however this time the output of journalctl -xe shows:
-- Subject: Unit mysql.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysql.service has failed. -- -- The result is failed. Feb 11 12:42:35 REDACTED systemd[1]: mysql.service: Unit entered failed state. Feb 11 12:42:35 REDACTED systemd[1]: mysql.service: Failed with result 'exit-code'. Feb 11 12:42:35 REDACTED systemd[1]: mysql.service: Service hold-off time over, scheduling restart. Feb 11 12:42:35 REDACTED systemd[1]: Stopped MySQL Community Server. -- Subject: Unit mysql.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysql.service has finished shutting down. Feb 11 12:42:35 REDACTED systemd[1]: Starting MySQL Community Server... -- Subject: Unit mysql.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysql.service has begun starting up. Feb 11 12:42:37 REDACTED systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
This seems even more cryptic than the first output.
-
Ok, I started looking into the error.log file to get more info about what was happening. I found that there was an error about not being able to load something but the log file was pretty large so I created a new log file to replace this one and went to restart mysql so I would have the one attempt's worth of records to review. To my surprise, after having provided a new error.log file, mysql started up no problem. Not sure wtf that was all about or why it failed with the current error.log contents.
I'm removing mysql and starting from scratch to see if I can replicate the issue.
-
That's a weird one!
-
@scottalanmiller Why the heck would a log file stop a service from loading?!
-
@DustinB3403 No idea. But it worked.
-
Now that you resolved that issue, why are you using 16.04.1?
-
@JaredBusch said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
Now that you resolved that issue, why are you using 16.04.1?
Because testing everything before upgrading to 16.10 is more work than I have time for right now.
-
@NashBrydges said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
@JaredBusch said in MySQL db refusing to start after Ubuntu 16.04.1 reboot:
Now that you resolved that issue, why are you using 16.04.1?
Because testing everything before upgrading to 16.10 is more work than I have time for right now.
Upgrades get harder and harder as you get more versions behind. 17.04 is less than two months away. Just keep in mind that the easiest process is updating on a roughly six month cycle with Ubuntu. It's the least chance of things breaking.