Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: MySQL will not shut down
PostPosted: Wed Apr 14, 2010 12:47 am 
Offline
Junior Member

Joined: Sun Jan 20, 2008 8:20 pm
Posts: 25
I have two Linodes, one a web server, the other a place for backups. I set up the backup server to also be a MySQL replication server so I could then take database backups with automysqlbackup script. It works great.

I recently posted about not being able to get MySQL to run after I upgraded the web server from Ubuntu 8.10 to 9.10. That problem was resolved by commenting out "skip-bdb" in my.cnf.

I have since moved on to begin upgrading the backup server from Ubuntu 8.10 to 9.10. Now, I have the opposite problem. I cannot get MySQL to stop so that I can begin the upgrade.

I've tried
Code:
/etc/init.d/mysql stop
but MySQL keeps on going.
I've tried
Code:
killall mysql
and get returned "no process killed."

Each time I attempt to run
Code:
apt-get upgrade
I get the following error:
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-common dhcp3-client
  dhcp3-common libapache2-mod-php5 libcups2 libcupsimage2 libexpat1 libkrb53
  libpng12-0 libpq5 libssl0.9.8 libthai-data libthai0 mysql-server
  mysql-server-5.0 openssl php5 php5-cli php5-common php5-curl php5-gd
  php5-mysql python2.5 python2.5-minimal sudo tzdata
29 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0B/43.9MB of archives.
After this operation, 53.2kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 18393 files and directories currently installed.)
Preparing to replace mysql-server 5.0.67-0ubuntu6 (using .../mysql-server_5.0.67-0ubuntu6.1_all.deb) ...
 * Stopping MySQL database server mysqld
   ...fail!
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 1
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing /var/cache/apt/archives/mysql-server_5.0.67-0ubuntu6.1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server_5.0.67-0ubuntu6.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Can anyone point me in the right direction to a solution?


Top
   
 Post subject:
PostPosted: Wed Apr 14, 2010 2:26 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
As root run the following

ps -A | grep mysql

grab the pids then run

kill pid (replace pid with the pids you got) do it for each process.

If kill pid doesn't work use

kill -9 pid (where pid is the id of the process)

You must run mysqlcheck on restarting your server after running kill -9 since it kills and doesn't allow for a clean shutdown.

Remember it may take a few seconds for mysql to shutdown cleanly.


Top
   
 Post subject: thanks
PostPosted: Sat Apr 17, 2010 9:50 pm 
Offline
Junior Member

Joined: Sun Jan 20, 2008 8:20 pm
Posts: 25
that did it.

I had to use kill-9 on a mysqld process, but after that, I was able to continue on with the upgrade.

Cheers


Top
   
 Post subject:
PostPosted: Thu Apr 22, 2010 1:25 pm 
Offline
Newbie

Joined: Thu Apr 22, 2010 12:58 pm
Posts: 4
yea happened to me when i migrated from dallas to atlanta cluster. In the background it seems to be a permission problem. I did exactly as you

1)kill the process
2)upgraded mysql (reinstall should work as well just need to keep conf files)

all works :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group