In Sqlite, I can query for tables names and their structure like this:
SELECT name, sql
FROM sqlite_master
WHERE type = 'table' AND Name NOT LIKE '%sqlite%'
I want to query for database schematic for MySQL database. Some digging in phpMyAdmin, I end with this:
SELECT SCHEMA_NAME, TABLE_NAME
FROM SCHEMATA, TABLES
WHERE SCHEMA_NAME = TABLE_SCHEMA AND SCHEMA_NAME ='myDb'
Unfortunately, this will only output tables names. Is there any sql query do the some work of:
mysqldump -u root myDb --no-data=true --add-drop-table=false > myDb.sql