Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export only events from a MySQL database

As a part of a migration, I need to export MySQL events from a MySQL 5.6 cluster and import them in a MySQL 5.7 cluster

Is copying the table mysql.event enough for this or is there any better way to export only events from a MySQL database?

like image 349
ProT-0-TypE Avatar asked Jan 03 '23 06:01

ProT-0-TypE


1 Answers

I tried this:

mysqldump -A --no-data --no-create-info --skip-triggers --no-create-db \
   --events > just-events.sql

It seems to dump only events.

like image 119
Bill Karwin Avatar answered Jan 07 '23 15:01

Bill Karwin