learner
learner

Reputation: 2789

How to dump mysql database with out data?

Hi need to dump my mysql database with views and sp's. But I don't need any data. How can I write mysqldump command for that?

Upvotes: 1

Views: 192

Answers (2)

Thomas Berger
Thomas Berger

Reputation: 1870

--no-data, -d

       Do not write any table row information (that is, do not dump table contents). This is useful if you want to dump only the CREATE TABLE statement for
       the table (for example, to create an empty copy of the table by loading the dump file).

Source: man mysqldump and mysqldump --help

Upvotes: 1

triclosan
triclosan

Reputation: 5714

  -R, --routines      Dump stored routines (functions and procedures).

Upvotes: 2

Related Questions