dump.sql contanins also events

6.4k Views Asked by At

I just want to know if, when I create a backup (dump.sql) of my MySQL db, it will contains also events that I create and that perform changes in my db for example every day. The events will be stored in the database information_schema so I'm not sure that with the backup of my db I save also the events... Thanks in advance.

3

There are 3 best solutions below

7
On BEST ANSWER

It can, but only if you include the --events option.

Or, in MySQL Administrator:

dump events

0
On

For example, using -E or --events, you can export the schema and data of the tables of apple database with its events to backup.sql as shown below. *My answer explains how to perfectly export databases:

mysqldump -u john -p -E apple > backup.sql

Or:

mysqldump -u john -p --events apple > backup.sql
0
On

From the command line , run the mysqldump command with --noevents flag

mysqldump -u username -p --events dbname > anyfilename.sql