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

2008-03-08 Thread Waynn Lue
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 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <[EMAIL PROTECTED]> 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:
>
> [EMAIL PROTECTED]:~$ 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/[EMAIL PROTECTED]
> >
> >
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



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

2008-03-08 Thread Baron Schwartz
Hi,

On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <[EMAIL PROTECTED]> 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:

[EMAIL PROTECTED]:~$ 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/[EMAIL PROTECTED]
>
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



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

2008-03-08 Thread Craig Huffstetler
Waynn:

What user are you using to execute mysql from the command line? Perhaps run
mysql (from command line) as root then execute the desired actions (such as
drop). This will make sure you can drop the table and avoid any further
problems.

Sincerely,

Craig Huffstetler

On Sat, Mar 8, 2008 at 6:58 AM, Waynn Lue <[EMAIL PROTECTED]> 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)
>
> 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/[EMAIL PROTECTED]
>
>


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

2008-03-08 Thread Martin Gainty
Waynn-

does the OS user you use to execute mysql have create/write/read/execute
rights to the ./test folder?

Martin-
- Original Message -
From: "Waynn Lue" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, March 08, 2008 6:58 AM
Subject: Can't drop database that shows up in show databases


> 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)
>
> 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/[EMAIL PROTECTED]
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can't drop database that shows up in show databases

2008-03-08 Thread Waynn Lue
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)

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/[EMAIL PROTECTED]



Re: Can't drop database

2004-06-21 Thread Michael Stassen
When you DROP DATABASE 'base', mysql drops all its tables then drops the db. 
 At the filesystem, this means deleting all the table files from the 'base' 
subdirectory of mysql's data directory, then deleting the 'base directory 
itself.  If 'base' contains a file that isn't a table file, however, that 
file won't be deleted by mysql, which causes the attempt to delete the 
directory to fail.  Since directory 'base' still exists, mysql sees it as db 
'base' still exists.  So check in 'base' for any leftover files and either 
delete them or move them somewhere else, then try again.

Michael
michael watson (IAH-C) wrote:
Hi
I am running Suse Linux 8.2 and MySQL 3.23.55
A funny thing happens:
%> mysqladmin drop base
Database "base" dropped
%> mysqladmin create base
Can't create database 'base'. Database exists.
And if I log in to MySQL, there it is - undropped!
So why is mysqladmin telling me the database is dropped when it isn't?
Thanks in advance!
Mick

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Can't drop database

2004-06-21 Thread michael watson (IAH-C)
Hi

I am running Suse Linux 8.2 and MySQL 3.23.55

A funny thing happens:

%> mysqladmin drop base
Database "base" dropped
%> mysqladmin create base
Can't create database 'base'. Database exists.

And if I log in to MySQL, there it is - undropped!

So why is mysqladmin telling me the database is dropped when it isn't?

Thanks in advance!

Mick

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: can't drop database: ERROR 1217

2004-05-14 Thread Ansari, Raza \(GEI, GEFA\)
Dean,
   Seems your database has a table with foreign key constraints. You need to delete 
that table first and then you will be able to drop database successfully. 

Hope that helps!!!
Raza

-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 4:13 AM
To: [EMAIL PROTECTED]
Subject: can't drop database: ERROR 1217


version: mysql  Ver 12.22 Distrib 4.0.18, for pc-linux (i686)

mysql> DROP DATABASE xxx;
ERROR 1217: Cannot delete or update a parent row: a foreign key 
constraint fails

what is this all about? how the heck can I drop the database?
Dean Hoover



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



can't drop database: ERROR 1217

2004-05-14 Thread Dean A. Hoover
version: mysql  Ver 12.22 Distrib 4.0.18, for pc-linux (i686)

mysql> DROP DATABASE xxx;
ERROR 1217: Cannot delete or update a parent row: a foreign key 
constraint fails

what is this all about? how the heck can I drop the database?
Dean Hoover


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]