Method 1: Use mysqldump -- no-data to export the SQL statement for creating the database and table, drop the database, create the database, execute the exported SQL file, and create the table. Method 2: generate sqlmysql-n-s information_schema-e "select Concat ('truncate table', table_name, ';') from tables where table_schema = 'eab12 '"
The output result is as follows: truncate table authgroupbindings;
Truncate table authgroups;
Truncate table authusers;
Truncate table corpbadcustominfo;
Truncate table corpsmsblacklisyinfo;
Truncate table corpsmsfilterinfo;
Truncate table corpsmsinfo;
Truncate table eabasereginfos;
Truncate table eacorpblob;
Truncate table eacorpinfo ;........ this improves: mysql-n-s information_schema-e "select Concat ('truncate table', table_name ,';') from tables where table_schema = 'ab12' "| MySQL eab12 clears all tables in eab12. However, if a foreign key exists, an error may be reported. Therefore, you also need to add-fmysql-n-s information_schema-e "select Concat ('truncate table', table_name ,';') from tables where table_schema = 'ab12' "| mysql-F eab12 is executed several times until no error is reported.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.