Shutdown Hangs on “A stop job is running to for Mysql Community Server” on Ubuntu 16.04.2 LTS
up vote
11
down vote
favorite
I'm using Mysql ver 14.14 Distrib 5.7.17, for Linux (x86_64). Whenever i shutdown Ubuntu, it hangs here.
After 10 minutes, it automatically kills the process (my guess). I ran into this problem many times, i did a clean install a few times, it works for a while but then start doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing shutdown like this corrupted my Mysql data. Does anyone ran into this problem? I'm using Ubuntu Ubuntu 16.04.2 LTS.
16.04 mysql
add a comment |
up vote
11
down vote
favorite
I'm using Mysql ver 14.14 Distrib 5.7.17, for Linux (x86_64). Whenever i shutdown Ubuntu, it hangs here.
After 10 minutes, it automatically kills the process (my guess). I ran into this problem many times, i did a clean install a few times, it works for a while but then start doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing shutdown like this corrupted my Mysql data. Does anyone ran into this problem? I'm using Ubuntu Ubuntu 16.04.2 LTS.
16.04 mysql
2
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
What happens when you runsudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.
– Patrick
Jul 19 at 15:22
add a comment |
up vote
11
down vote
favorite
up vote
11
down vote
favorite
I'm using Mysql ver 14.14 Distrib 5.7.17, for Linux (x86_64). Whenever i shutdown Ubuntu, it hangs here.
After 10 minutes, it automatically kills the process (my guess). I ran into this problem many times, i did a clean install a few times, it works for a while but then start doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing shutdown like this corrupted my Mysql data. Does anyone ran into this problem? I'm using Ubuntu Ubuntu 16.04.2 LTS.
16.04 mysql
I'm using Mysql ver 14.14 Distrib 5.7.17, for Linux (x86_64). Whenever i shutdown Ubuntu, it hangs here.
After 10 minutes, it automatically kills the process (my guess). I ran into this problem many times, i did a clean install a few times, it works for a while but then start doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing shutdown like this corrupted my Mysql data. Does anyone ran into this problem? I'm using Ubuntu Ubuntu 16.04.2 LTS.
16.04 mysql
16.04 mysql
asked Mar 11 '17 at 16:59
Waleed Ahmad
166116
166116
2
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
What happens when you runsudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.
– Patrick
Jul 19 at 15:22
add a comment |
2
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
What happens when you runsudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.
– Patrick
Jul 19 at 15:22
2
2
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
What happens when you run
sudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.– Patrick
Jul 19 at 15:22
What happens when you run
sudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.– Patrick
Jul 19 at 15:22
add a comment |
7 Answers
7
active
oldest
votes
up vote
4
down vote
Before shutting down your system, try running this to manually shut down the mysql service.
sudo service mysql stop
Alternatively, write a script to automate the process:
sudo service mysql stop
sudo shutdown -h now
Make sure to mark it as executable. Presuming you saved it as a file named shutdown
, run this command:
chmod u+x shutdown
Now you can execute your script.
./shutdown
4
If MySql server hangs on shutdown, it will also hang onservice mysql stop
command. Right approach here is to investigate why MySql server hangs.
– Vitaliy
Apr 13 at 10:35
add a comment |
up vote
3
down vote
Thats because you got problems with timezone settings:
Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).
Running sudo dpkg-reconfigure tzdata
should do the trick
Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11
add a comment |
up vote
1
down vote
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
New contributor
add a comment |
up vote
0
down vote
This happens to me to when I changed the hostname with :
$ sudo hostnamectl set-hostname my-new-hostname
without stopping the mysql server.
add a comment |
up vote
0
down vote
Shut down the pc using command- sudo init 0
Though this sounds stupid but yes, it works. It worked for me and even for you too. Actually the server does not stopped because of not being getting the super administrative privileges. So next time shut down using this command.
add a comment |
up vote
0
down vote
If it helps anyone else, this is what has resolved the issue for me on Ubuntu 16.04 LTS. Basically delayed the service startup in the mysql.service file under /lib/systemd/system/
I added
After=lightdm.service
and wants=lightdm.service
.
(My lightdm.service is itself delayed until domain authentication has taken place)
I guess you could use any other service that you know will start later on in the boot. These service files will also shutdown the services when Ubuntu is shutdown in the reverse order.
add a comment |
up vote
0
down vote
I tried running sudo apt-get install mysql*
, and after the installation finished everything seems to be working nice and easy now... Both following the user680697's nice idea and also shutting down or restarting using GUI capabilities(I'm on Ubuntu Mate 16.04).
add a comment |
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Before shutting down your system, try running this to manually shut down the mysql service.
sudo service mysql stop
Alternatively, write a script to automate the process:
sudo service mysql stop
sudo shutdown -h now
Make sure to mark it as executable. Presuming you saved it as a file named shutdown
, run this command:
chmod u+x shutdown
Now you can execute your script.
./shutdown
4
If MySql server hangs on shutdown, it will also hang onservice mysql stop
command. Right approach here is to investigate why MySql server hangs.
– Vitaliy
Apr 13 at 10:35
add a comment |
up vote
4
down vote
Before shutting down your system, try running this to manually shut down the mysql service.
sudo service mysql stop
Alternatively, write a script to automate the process:
sudo service mysql stop
sudo shutdown -h now
Make sure to mark it as executable. Presuming you saved it as a file named shutdown
, run this command:
chmod u+x shutdown
Now you can execute your script.
./shutdown
4
If MySql server hangs on shutdown, it will also hang onservice mysql stop
command. Right approach here is to investigate why MySql server hangs.
– Vitaliy
Apr 13 at 10:35
add a comment |
up vote
4
down vote
up vote
4
down vote
Before shutting down your system, try running this to manually shut down the mysql service.
sudo service mysql stop
Alternatively, write a script to automate the process:
sudo service mysql stop
sudo shutdown -h now
Make sure to mark it as executable. Presuming you saved it as a file named shutdown
, run this command:
chmod u+x shutdown
Now you can execute your script.
./shutdown
Before shutting down your system, try running this to manually shut down the mysql service.
sudo service mysql stop
Alternatively, write a script to automate the process:
sudo service mysql stop
sudo shutdown -h now
Make sure to mark it as executable. Presuming you saved it as a file named shutdown
, run this command:
chmod u+x shutdown
Now you can execute your script.
./shutdown
edited Apr 21 '17 at 4:30
Zanna
49k13123234
49k13123234
answered Apr 21 '17 at 3:04
user680697
412
412
4
If MySql server hangs on shutdown, it will also hang onservice mysql stop
command. Right approach here is to investigate why MySql server hangs.
– Vitaliy
Apr 13 at 10:35
add a comment |
4
If MySql server hangs on shutdown, it will also hang onservice mysql stop
command. Right approach here is to investigate why MySql server hangs.
– Vitaliy
Apr 13 at 10:35
4
4
If MySql server hangs on shutdown, it will also hang on
service mysql stop
command. Right approach here is to investigate why MySql server hangs.– Vitaliy
Apr 13 at 10:35
If MySql server hangs on shutdown, it will also hang on
service mysql stop
command. Right approach here is to investigate why MySql server hangs.– Vitaliy
Apr 13 at 10:35
add a comment |
up vote
3
down vote
Thats because you got problems with timezone settings:
Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).
Running sudo dpkg-reconfigure tzdata
should do the trick
Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11
add a comment |
up vote
3
down vote
Thats because you got problems with timezone settings:
Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).
Running sudo dpkg-reconfigure tzdata
should do the trick
Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11
add a comment |
up vote
3
down vote
up vote
3
down vote
Thats because you got problems with timezone settings:
Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).
Running sudo dpkg-reconfigure tzdata
should do the trick
Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11
Thats because you got problems with timezone settings:
Got the same issue, found a possible explanation: my cloud provider store time in local timezone (earlier than UTC); at startup MySQL boot first, then NTP, which updates the time to UTC; therefore, MySQL literally "started in the future" (sounds interesting).
Running sudo dpkg-reconfigure tzdata
should do the trick
Source: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1600164/comments/11
answered Nov 16 '17 at 18:56
Titenis
311
311
add a comment |
add a comment |
up vote
1
down vote
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
New contributor
add a comment |
up vote
1
down vote
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
New contributor
add a comment |
up vote
1
down vote
up vote
1
down vote
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
New contributor
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
New contributor
edited Nov 20 at 22:16
zx485
1,43831114
1,43831114
New contributor
answered Nov 20 at 17:58
Frank Verbeke
111
111
New contributor
New contributor
add a comment |
add a comment |
up vote
0
down vote
This happens to me to when I changed the hostname with :
$ sudo hostnamectl set-hostname my-new-hostname
without stopping the mysql server.
add a comment |
up vote
0
down vote
This happens to me to when I changed the hostname with :
$ sudo hostnamectl set-hostname my-new-hostname
without stopping the mysql server.
add a comment |
up vote
0
down vote
up vote
0
down vote
This happens to me to when I changed the hostname with :
$ sudo hostnamectl set-hostname my-new-hostname
without stopping the mysql server.
This happens to me to when I changed the hostname with :
$ sudo hostnamectl set-hostname my-new-hostname
without stopping the mysql server.
answered May 18 at 7:05
Gabriel Glenn
1287
1287
add a comment |
add a comment |
up vote
0
down vote
Shut down the pc using command- sudo init 0
Though this sounds stupid but yes, it works. It worked for me and even for you too. Actually the server does not stopped because of not being getting the super administrative privileges. So next time shut down using this command.
add a comment |
up vote
0
down vote
Shut down the pc using command- sudo init 0
Though this sounds stupid but yes, it works. It worked for me and even for you too. Actually the server does not stopped because of not being getting the super administrative privileges. So next time shut down using this command.
add a comment |
up vote
0
down vote
up vote
0
down vote
Shut down the pc using command- sudo init 0
Though this sounds stupid but yes, it works. It worked for me and even for you too. Actually the server does not stopped because of not being getting the super administrative privileges. So next time shut down using this command.
Shut down the pc using command- sudo init 0
Though this sounds stupid but yes, it works. It worked for me and even for you too. Actually the server does not stopped because of not being getting the super administrative privileges. So next time shut down using this command.
answered Jun 21 at 11:31
Vikramsingh Kushwaha
1
1
add a comment |
add a comment |
up vote
0
down vote
If it helps anyone else, this is what has resolved the issue for me on Ubuntu 16.04 LTS. Basically delayed the service startup in the mysql.service file under /lib/systemd/system/
I added
After=lightdm.service
and wants=lightdm.service
.
(My lightdm.service is itself delayed until domain authentication has taken place)
I guess you could use any other service that you know will start later on in the boot. These service files will also shutdown the services when Ubuntu is shutdown in the reverse order.
add a comment |
up vote
0
down vote
If it helps anyone else, this is what has resolved the issue for me on Ubuntu 16.04 LTS. Basically delayed the service startup in the mysql.service file under /lib/systemd/system/
I added
After=lightdm.service
and wants=lightdm.service
.
(My lightdm.service is itself delayed until domain authentication has taken place)
I guess you could use any other service that you know will start later on in the boot. These service files will also shutdown the services when Ubuntu is shutdown in the reverse order.
add a comment |
up vote
0
down vote
up vote
0
down vote
If it helps anyone else, this is what has resolved the issue for me on Ubuntu 16.04 LTS. Basically delayed the service startup in the mysql.service file under /lib/systemd/system/
I added
After=lightdm.service
and wants=lightdm.service
.
(My lightdm.service is itself delayed until domain authentication has taken place)
I guess you could use any other service that you know will start later on in the boot. These service files will also shutdown the services when Ubuntu is shutdown in the reverse order.
If it helps anyone else, this is what has resolved the issue for me on Ubuntu 16.04 LTS. Basically delayed the service startup in the mysql.service file under /lib/systemd/system/
I added
After=lightdm.service
and wants=lightdm.service
.
(My lightdm.service is itself delayed until domain authentication has taken place)
I guess you could use any other service that you know will start later on in the boot. These service files will also shutdown the services when Ubuntu is shutdown in the reverse order.
answered Jul 19 at 14:50
Rob
1
1
add a comment |
add a comment |
up vote
0
down vote
I tried running sudo apt-get install mysql*
, and after the installation finished everything seems to be working nice and easy now... Both following the user680697's nice idea and also shutting down or restarting using GUI capabilities(I'm on Ubuntu Mate 16.04).
add a comment |
up vote
0
down vote
I tried running sudo apt-get install mysql*
, and after the installation finished everything seems to be working nice and easy now... Both following the user680697's nice idea and also shutting down or restarting using GUI capabilities(I'm on Ubuntu Mate 16.04).
add a comment |
up vote
0
down vote
up vote
0
down vote
I tried running sudo apt-get install mysql*
, and after the installation finished everything seems to be working nice and easy now... Both following the user680697's nice idea and also shutting down or restarting using GUI capabilities(I'm on Ubuntu Mate 16.04).
I tried running sudo apt-get install mysql*
, and after the installation finished everything seems to be working nice and easy now... Both following the user680697's nice idea and also shutting down or restarting using GUI capabilities(I'm on Ubuntu Mate 16.04).
answered Nov 1 at 14:41
Tower
28111
28111
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f892026%2fshutdown-hangs-on-a-stop-job-is-running-to-for-mysql-community-server-on-ubunt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Same here. Thanks for ask this question.
– Matěj Kříž
Apr 25 '17 at 16:33
What happens when you run
sudo service mysql stop
on the command line? Maybe some script needs some intervention when shutting down the MySQL server.– Patrick
Jul 19 at 15:22