Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] MySQL behaving strangely



Dave M G wrote:
So I thought I would reinstall MySQL using Synaptic, and it gave me errors. It said the package hard errors in it, and it wouldn't re-install. Then I tried removing it, and then it ironically told me that it had errors and I should reinstall it before attempting to remove it.

I tried removing it from the command line, and it said this:

Preconfiguring packages ...
(Reading database ... 111433 files and directories currently installed.)
Preparing to replace mysql-server-5.0 5.0.51a-3ubuntu5.1 (using .../mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb) ...
* Stopping MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
* Stopping MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "stop" failed.

Well I am guessing about what caused your original problem but.

Some change in your my.conf probably caused MySQL to crash after being started by the init script. This probably occured after it created a pid file. When you tried to rerun mysql it probably looked at the pid file presumed MySQL was already running and refused to start.

Because the init script thinks MySQL is running so does the package manager which tries to stop it before removing the old package. Because the init script returns an error the pre-removal script fails and so the package manager refuses to upgrade the package.

What you need to do is force the package to be remove the package even if an error occurs in the pre-removal script. I don't know whether you can do this with the Synaptic package manager but I am pretty sure it is possible with dpkg. Once you have forced the uninstall of the old package the new package should install without problems.

Alternatively you could try forcing the init script to reset. I don't know how you do this under ubuntu but you would run /etc/init.d/mysql zap under Gentoo.

Edward


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links