Delete an invalid view in MySQL

Viewed 86

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".

1 Answers

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;
Related