Linux命令刪除注釋
先把庫表導出成一個.sql文件,然后使用sed命令刪除注釋。此種適用於mysql端口不開外網的情況。
$ cat create_table.sql create table test1 ( field_name int comment '字段的注釋' )comment='表的注釋'; $ sed "s/comment.\'.*\'//" create_table.sql create table test1 ( field_name int );
修改information_schema表不可行
update information_schema.COLUMNS set COLUMN_COMMENT = '' where TABLE_SCHEMA = 'demo';
執行以上sql發現沒有權限,是因為information_schema是只讀表。