Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] MySQL Table Locked?
  • From: Onemarty <marty.one@xxxxxxxxxx>
  • Date: Tue, 29 Mar 2005 20:11:37 +0300
  • Message-id: <200503292011.37787.marty.one@xxxxxxxxxx>
Andy,

Presuming that you've already tried the UNLOCK TABLES-command and it didn't
help...

I've seen similar problems (w/ 4.0.18). Found out this:

- If you make a complete copy of the database, eg. database 'data1' to 'data2'
the new database ('data2') is not locked. (which proves that the data itself
is okay, I think)
- If you then remove the old database ('data1') and rename 'data2' to 'data1'
it stops working, => locked.
- If you simply rename 'data1' to 'data2' it works.

So there must be a 'flag' or 'tag' or something in the mysql (system) database
that tells MySQL that the database is locked.

Now, what I didn't try was the following sequence:
- Copy 'data1' to 'data2'
- DROP DATABASE data1;
- rename 'data2' to 'data1'

I intended to do a little more research in MySQL's own database mysql,
but I stupidly first upgraded to 4.1 - only to find out that the old database
was 'unlocked' again. (Guess that something in mysql got overwritten)

I do not think that 4.1 fixed it, only that it cleared the 'tag', so I'm
waiting for the problem appear again, and then I'll try to catch it.

Marty


On Tuesday 29 March 2005 08:09, Andy Choens wrote:
> > I am not a DBA but using webmin to connect to mysql there is an icon for
> > table permissions that looks like you can change permissions for
> > individual tables. Maybe something has go wrong there. Just a suggestion
> > for something else to try before you pull all of your hair out.
>
> Well, I downloaded webmin and set it up. So far so good. It's not the
> interface I would like, but I don't seem to get any errors this way. Of
> course, I'm editing the table as root, so it had better let me do what ever
> the heck I want! :-)
>
> I'm going to install usermin and see if that helps any. If it does, at
> least I'll be able to use webmin while I figure out the root of my
> difficulty. It certainly gives my back access to my database, which is
> incredibly nice.
>
> Thanks for the idea. I'm going play around with these permissions more.
>
> --andy

< Previous Next >
Follow Ups