Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corrupted database; how to delete it?

Status
Not open for further replies.

RichardIII

Programmer
Jul 13, 2006
7
US
Hi All,

I'm running MySQL 5.0.15-nt running over WinXP-Pro/SP2. The following group of commands and responses suggests to me that my installation of MySQL is corrupted. Is there anyway I can get rid of the offending database "depot_test" short of un/reinstalling MySQL?

Thanks in Advance,
Richard

mysql> use depot_test;
Database changed
mysql> alter table products rename xxx;
ERROR 1146 (42S02): Table 'depot_test.products' doesn't exist
mysql> show tables
-> ;
+----------------------+
| Tables_in_depot_test |
+----------------------+
| products |
+----------------------+
1 row in set (0.00 sec)

mysql> drop table products;
ERROR 1051 (42S02): Unknown table 'products'
mysql>
 
mysql> repair database depot_test;

see what happens.

also check your mysql datadir= in the my.cnf file to ensure it points to the correct place.

also (linux) check that permissions are suited for mysql on its data directory

chmod -R 775 /var/lib/mysql #check its here.
chown -R mysql:mysql /var/lib/mysql

restart mysql, check (yourserver).mysql.err logfile for any startup errors.

see how that does for now.

K

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Hi KarveR,

Thanks for your response. Unfortunately, you didn't notice that I'm running on WindowsXP, so the unix stuff is only partially relevant.

In the meantime, I've been playing around with MySQl and found the file/folders that hold the databases. I did find a repair utility, but it complained that the database wasn't an ISAM file.

I shut down MySQL and was able to delete the bothersome one. I had a problem restarting it because it somehow lost its host=localhost parameter, but I got that reset.

MySQL didn't complain at all about my meddling in its data, so I'm good to go.

Thanks again for responding.

Regards,
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top