[KLUG Members] help please with mysql gone awry on debian

Jamie McCarthy jamie at mccarthy.vg
Sat Nov 27 18:34:23 EST 2004


rick at ricksweb.info (Richard Harding) writes:

> I have a woody server set up as a web server. I had it running
> php4, mysql, and apache. I tried to use the dotdeb sources to
> update to php5 and I ended up having problems with those php5
> packages.
> 
> So I decided to go back to stables packages. I removed apache,
> mysql, php and removed the sources. After and apt-get update I
> tried to install php4, mysql-server, and apache again.

If you're running a Debian "stable" release, aka the "woody"
codename, and there is functionality you want in a software release
that is later than what's provided by the package manager and which
other software relies on, there's only one recommended way to
install that software.  Namely, edit your /etc/apt/sources.list
file, changing the "stable" keyword to either "testing" or
"unstable" depending on how far towards the cutting edge you want to
go, and then doing an "apt-get update && apt-get dist-upgrade".

More on the three releases of Debian here:

    http://www.debian.org/releases/

I have never used dotdeb.org's packages.  But its homepage does
advise that it requires a beta feature "that might not work for all
the packages."  I'm not sure how that's consistent with its goal to
provide "a reliable and performant LAMP platform" ("performant"?).
If you want a reliable platform, I would recommend sticking with one
package management vendor, debian.org itself, rather than trying to
hybrid two of them together.

(For what it's worth, I have several systems running Debian
"unstable" release that haven't had any problems with their
LAMP-related software for as long as I can remember... years anyway.
I compile my own Apache from tarballs and let it install in
/usr/local/bin, and just don't bother to use Debian's.  Works great.)

It sounds like you went from MySQL 3.23.x which is provided by the
Debian stable release, to a recent version of MySQL 4.0.x with the
dotdeb sources, and then _back_ to 3.23.x.  MySQL is really good
about backwards compatibility when you upgrade to a later version of
its software, but as far as I know it's simply not designed to work
when you go _backwards_ a major release.  That may have caused a
whole host of problems.

You mentioned an error about user.frm which may be data corruption
in that table, and the mysql.err file you pasted in is not
inconsistent with that hypothesis.  It sounds like you don't have
any actual data in any MySQL databases at this point which is
probably a good thing.  So what I would do is apt-get remove all the
mysql-* packages, then go manually delete the mysql files you
mentioned already (/var/log/mysql, /etc/mysql, /etc/init.d/mysql) --
but also delete the data in /var/lib/mysql, since that's where your
data lives, and I don't think apt will delete it for you.  That data
may have been corrupted by the switch from 4.0.x back to 3.23.x.
Then try apt-get install again.

Of course, if you have database(s) of data that you need, under
/var/lib/mysql/, either keep them around or back them up somewhere.
-- 
  Jamie McCarthy
 http://mccarthy.vg/
  jamie at mccarthy.vg



More information about the Members mailing list