ClausTX
ClausTX

Reputation: 21

Delete an invalid view in MySQL

Got an exception when trying to export a database:

mysqldump: Couldn't execute 'show table status like 'cm_in_freq_ic__1000000': SELECT command denied to user 'myuser'@'localhost' for column 'in_id' in table 'cm_in_tran' (1143)

Trying to delete the view from phpmyadmin was not successful that the view is not valid and cannot be operated on: "cm_in_freq_ic__1000000".

Upvotes: 1

Views: 717

Answers (1)

ClausTX
ClausTX

Reputation: 21

One solution is to create a new view to overwrite the view name - where mytable is a valid table.

create or replace view cm_in_freq_ic__1000000 as select * from mytable;

Now drop the view - it's successful.

drop view cm_in_freq_ic__1000000;

Upvotes: 1

Related Questions