Obtain DDL scripts for MariaDB/MySQL schema objects

mysqldump backup utility of MySQL/MariaDB  supports the export of metadata or specifically creating DDL scripts with the option –no-data.

$ mysqldump -uroot -p test --no-data --routines --events --triggers > test_ddl.sql

Note: Remember to mention the –routines, –events and –triggers also to export the related objects.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.