How to Export your MySQL database schema to a file using the Command Line

H

How Can We Help?

Use the following command in the Command Line Interface

mysqldump --no-data --tables -uMYSQL_USER_NAME -pMYSQL_PASSWORD MYSQLDATABASE >> FILE_NAME.sql

Replace MYSQL_USER_NAME with your username,  MYSQL_PASSWORD with your password, MYSQLDATABASE with the database name you want to export andFILE_NAME.sql with the file that you wish to export the schema to.

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me