Results 1 to 9 of 9

Thread: Remove mysql-server-5.0 not possible

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Hässleholm, Skåne, Sweden
    Beans
    13
    Distro
    Ubuntu 9.10 Karmic Koala

    Angry Remove mysql-server-5.0 not possible

    Hi!

    I've tried to remove a package that is probably damaged or something. It does not work to remove it. The name of the package is mysql-server-5.0. If I try
    Code:
    sudo apt-get remove mysql-server-5.0
    I got this in return: (My bad translation sorry!)

    dpkg: error when handling mysql-server-5.0 (--remove)
    The package is in a inconsistent bad shape - you should try to reinstall it before you remove it.

    Error in handling:
    mysql-server-5.0

    E: Sub-process /usr/bin/dpkg returned an error code (1)
    What can I do?

  2. #2
    Join Date
    May 2008
    Location
    Cowtown
    Beans
    573
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Remove mysql-server-5.0 not possible

    try
    Code:
    sudo apt-get --reinstall install mysql-server
    as the error suggests then
    Code:
    sudo apt-get remove mysql-server

  3. #3
    Join Date
    Jul 2005
    Location
    Hässleholm, Skåne, Sweden
    Beans
    13
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Remove mysql-server-5.0 not possible

    Väljer tidigare ej valt paket mysql-server-5.0.
    (Läser databasen ... 143466 filer och kataloger installerade.)
    Förbereder att ersätta mysql-server-5.0 5.0.51a-3ubuntu5 (med .../mysql-server-5.0_5.0.51a-3ubuntu5_i386.deb) ...
    * Stopping MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action "stop" failed.
    dpkg: varning - gammalt pre-removal-skript returnerade felstatus 1
    dpkg - försöker skript från det nya paketet istället ...
    * Stopping MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action "stop" failed.
    dpkg: fel vid hantering av /var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5_i386.deb (--unpack):
    underprocess nytt pre-removal-skript gav felkod 1
    * Stopping MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action "stop" failed.
    * Starting MySQL database server mysqld [fail]
    invoke-rc.d: initscript mysql, action "start" failed.
    dpkg: fel vid upprensning:
    underprocess post-installation script gav felkod 1
    Packar upp mysql-server (från .../mysql-server_5.0.51a-3ubuntu5_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: fel vid hantering av /var/cache/apt/archives/mysql-server_5.0.51a-3ubuntu5_all.deb (--unpack):
    underprocess pre-installation script gav felkod 1
    Fel uppstod vid hantering:
    /var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5_i386.deb
    /var/cache/apt/archives/mysql-server_5.0.51a-3ubuntu5_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  4. #4
    Join Date
    Apr 2007
    Location
    Exeter, NH
    Beans
    10

    Re: Remove mysql-server-5.0 not possible

    Looks like you just need to stop mysql server before uninstalling. You can either stop the process manually or reboot or if that doesn't work, reboot into recovery mode.

    To stop the process manually without rebooting first get the process id's:
    ps -ef | grep mysql

    Then kill the processes using the ids in the second column:
    sudo kill -9 15691
    Ubuntu 9.10 (minimal) with Openbox / Windows XP SP3 (to play games)

  5. #5
    Join Date
    Jul 2005
    Location
    Hässleholm, Skåne, Sweden
    Beans
    13
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Remove mysql-server-5.0 not possible

    Thanx!

    I got this result from ps:

    fia@datorn:~$ ps -ef | grep mysql
    root 5662 1 0 16:57 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe
    mysql 5704 5662 0 16:57 ? 00:00:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
    root 5705 5662 0 16:57 ? 00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    fia 13799 9091 0 22:02 pts/0 00:00:00 grep mysql
    is it 5704 on the second line? Im not sure, just guessing

  6. #6
    Join Date
    Apr 2005
    Location
    Massachusetts, USA
    Beans
    1,578
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Remove mysql-server-5.0 not possible

    Try
    Code:
    sudo /etc/init.d/mysql stop
    If that doesn't work, then try
    Code:
    sudo killall mysqld
    sudo rm /var/run/mysqld/mysqld.pid
    sudo rm /var/run/mysqld/mysqld.sock
    Registered Linux User #446796
    Registered Ubuntu User #13489

  7. #7
    Join Date
    Mar 2013
    Beans
    12

    Re: Remove mysql-server-5.0 not possible

    I was having this same problem, and none of the solutions listed above worked. The "mysqld" process kept coming back.

    Here's the command I used to kill it for good:

    Code:
    sudo stop mysql
    Hope that helps.

    Source: http://www.itfromscratch.com/how-to-...-mysql-server/

  8. #8
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    14,758
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Remove mysql-server-5.0 not possible

    Thread closed. Please do not post in old threads.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •