Unix Technical Forum

Re: Can't drop database that shows up in show databases

This is a discussion on Re: Can't drop database that shows up in show databases within the MySQL General forum forums, part of the MySQL category; --> Hi, On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <waynnlue@gmail.com> wrote: > SHOW DATABASES; shows that I ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-09-2008, 01:37 PM
Baron Schwartz
 
Posts: n/a
Default Re: Can't drop database that shows up in show databases

Hi,

On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <waynnlue@gmail.com> wrote:
> SHOW DATABASES; shows that I have a database called "test", but when I
> call "DROP DATABASE test", I get
>
> ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist
>
> When I run any queries on that database, I get errors like:
>
> mysql> select * from Users;
> ERROR 1017 (HY000): Can't find file: './test/Users.frm' (errno: 13)


Whenever you see "errno: X", run perror and see what the error is:

baron@kanga:~$ perror 13
OS error code 13: Permission denied

That is why other posters are suggesting it might be a permissions
problem. It sounds to me like there might be an InnoDB problem mixed
in with this: did you delete any .frm files (or databases) from the
filesystem without first dropping the InnoDB files that use them?
InnoDB will complain about this if you did.

>
> My previous solution of deleting the ./test folder worked only
> temporarily, but restarting mysqld seemed to recreate it. Anyone have
> ideas on how to drop this database?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=baron@xaprb.com
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-09-2008, 01:37 PM
Waynn Lue
 
Posts: n/a
Default Re: Can't drop database that shows up in show databases

This problem actually started after I moved the datadir to another
folder, so that's quite possible. We stopped everything, rsynced the
folders over, then restarted mysql. But I do notice a permissions
problem, since the owner currently is root. I'll chown it to mysql
then see what happens.

I'll post back with results.

Thanks for all the advice,
Waynn



On 3/8/08, Baron Schwartz <baron@xaprb.com> wrote:
> Hi,
>
> On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <waynnlue@gmail.com> wrote:
> > SHOW DATABASES; shows that I have a database called "test", but when I
> > call "DROP DATABASE test", I get
> >
> > ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist
> >
> > When I run any queries on that database, I get errors like:
> >
> > mysql> select * from Users;
> > ERROR 1017 (HY000): Can't find file: './test/Users.frm' (errno: 13)

>
> Whenever you see "errno: X", run perror and see what the error is:
>
> baron@kanga:~$ perror 13
> OS error code 13: Permission denied
>
> That is why other posters are suggesting it might be a permissions
> problem. It sounds to me like there might be an InnoDB problem mixed
> in with this: did you delete any .frm files (or databases) from the
> filesystem without first dropping the InnoDB files that use them?
> InnoDB will complain about this if you did.
>
> >
> > My previous solution of deleting the ./test folder worked only
> > temporarily, but restarting mysqld seemed to recreate it. Anyone have
> > ideas on how to drop this database?
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe: http://lists.mysql.com/mysql?unsub=baron@xaprb.com
> >
> >

>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com