[HOW TO] How to exclude table in mysql

Today morning, developer told me: please send me the database of ***.
Me: do you really need to it?
Developer: ya, I need it.
Me: okay, wait me for minutes.

And I need to exclude one table in database with him. Databases has some tables securely, he did not know it.

How to export database while excluding the table?

mysqldump --ignore-table=db_name.table_name db_name > export.sql
mysqldump --no-data db_name table_name >> export.sql

Above command help you.

Hope this help!

-
Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

0 nhận xét:

Post a Comment