Search code examples
mysqlmysql-event

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?


Solution

  • 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.