Shutdown hangs on “A stop job is running to for Mysql Community Server”
I'm using MySQL ver 14.14 Distrib 5.7.17 for Linux (x86_64) on Ubuntu 16.04. 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 starts doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing a shutdown like this corrupted my MySQL data. Has anyone else ran into this problem?
16.04 mysql shutdown
add a comment |
I'm using MySQL ver 14.14 Distrib 5.7.17 for Linux (x86_64) on Ubuntu 16.04. 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 starts doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing a shutdown like this corrupted my MySQL data. Has anyone else ran into this problem?
16.04 mysql shutdown
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 '18 at 15:22
add a comment |
I'm using MySQL ver 14.14 Distrib 5.7.17 for Linux (x86_64) on Ubuntu 16.04. 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 starts doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing a shutdown like this corrupted my MySQL data. Has anyone else ran into this problem?
16.04 mysql shutdown
I'm using MySQL ver 14.14 Distrib 5.7.17 for Linux (x86_64) on Ubuntu 16.04. 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 starts doing the same thing after a few proper shutdowns.
Pressing Ctrl+Alt+Del 7 times consecutively forces a shutdown. Forcing a shutdown like this corrupted my MySQL data. Has anyone else ran into this problem?
16.04 mysql shutdown
16.04 mysql shutdown
edited 3 hours ago
karel
58k12128146
58k12128146
asked Mar 11 '17 at 16:59
Waleed AhmadWaleed 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 '18 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 '18 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 '18 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 '18 at 15:22
add a comment |
8 Answers
8
active
oldest
votes
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 '18 at 10:35
add a comment |
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 |
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
add a comment |
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 |
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 |
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 |
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 |
Strangely enough, this worked for me:
sudo dpkg-reconfigure tzdata
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'
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 '18 at 10:35
add a comment |
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 '18 at 10:35
add a comment |
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
50.4k13133241
50.4k13133241
answered Apr 21 '17 at 3:04
user680697user680697
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 '18 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 '18 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 '18 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 '18 at 10:35
add a comment |
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 |
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 |
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
TitenisTitenis
311
311
add a comment |
add a comment |
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
add a comment |
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
add a comment |
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
Install mysql-client
with
apt-get install mysql-client
That should be sufficient.
edited Nov 20 '18 at 22:16
zx485
1,45231114
1,45231114
answered Nov 20 '18 at 17:58
Frank VerbekeFrank Verbeke
111
111
add a comment |
add a comment |
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 |
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 |
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 '18 at 7:05
Gabriel GlennGabriel Glenn
1287
1287
add a comment |
add a comment |
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 |
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 |
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 '18 at 11:31
Vikramsingh KushwahaVikramsingh Kushwaha
1
1
add a comment |
add a comment |
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 |
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 |
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 '18 at 14:50
RobRob
11
11
add a comment |
add a comment |
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 |
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 |
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 '18 at 14:41
TowerTower
28111
28111
add a comment |
add a comment |
Strangely enough, this worked for me:
sudo dpkg-reconfigure tzdata
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'
New contributor
add a comment |
Strangely enough, this worked for me:
sudo dpkg-reconfigure tzdata
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'
New contributor
add a comment |
Strangely enough, this worked for me:
sudo dpkg-reconfigure tzdata
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'
New contributor
Strangely enough, this worked for me:
sudo dpkg-reconfigure tzdata
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'
New contributor
New contributor
answered 4 hours ago
Kira02Kira02
11
11
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%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 '18 at 15:22