Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
145 views
in Technique[技术] by (71.8m points)

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

question from:https://stackoverflow.com/questions/65865709/delete-an-invalid-view-in-mysql

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...