export to sql file mysql database code example
Example 1: mysql export database command line
mysqldump -uroot -p root YourDatabaseName > WantedSQLFile.sql
Example 2: export mysql table to file
mysqldump db_name tbl_name;
mysqldump -uroot -p root YourDatabaseName > WantedSQLFile.sql
mysqldump db_name tbl_name;