How to generate DDL for all tables in a database in MySQL
Solution 1:
You can do it using the mysqldump command line utility:
mysqldump -d -u <username> -p<password> -h <hostname> <dbname>
The -d
option means "without data".
You can do it using the mysqldump command line utility:
mysqldump -d -u <username> -p<password> -h <hostname> <dbname>
The -d
option means "without data".