Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I delete tables marked 'in use' using phpmyadmin

As in title. When I try to drop these tables I see something like this:

1051: Unknown table 'urls_count'

Tables are marked as 'in use':

screenshot of the problem

I have checked that no application is using these table, as this is new database on my server and is not connected anywhere. Also there are no dependencies between these tables. I tried to repair these tables, optimize them, check them, and whatever actions I can run, even if it seems bit awkward, but I still cant get rid of them.

How can I delete them?


Web server configuration:

cpsrvd 11.32.2.28, MySQL client version: 5.0.95, PHP extension: mysql

MySQL configuration:

Server: Localhost via UNIX socket, Server version: 5.0.95-community, Protocol version: 10, MySQL charset: UTF-8 Unicode (utf8)

PHPmyadmin version: 3.4.10.1

like image 493
Karol Avatar asked Jun 01 '12 10:06

Karol


1 Answers

If you have shell access, try this;

cd /var/lib/mysql/DATABASE (where DATABASE is the one you're trying to fix)

myisamchk --safe-recover TABLE (where TABLE is the table you are tring to fix)

This will will repair the table in safemode, and SHOULD result in success.

like image 104
Alon Adler Avatar answered Nov 19 '22 20:11

Alon Adler