Export commands in MySQL

 Use the mysqldump utility to export the database. The command is used as follows:

mysqldump -uUSERNAME -p DB_NAME > exported.sql


To export a specific table, you can use the following command:

$ mysqldump -u USER_NAME -p DB_NAME table1 table2 > file_name


To export multiple databases, you can use the following command:

$ mysqldump -u USER_NAME -p ---databases DB_NAME1 DB_Name2 DB_Name3> file_name


To prevent a table from being exported, use the following command:

$ mysqldump -u USER_NAME -p DB_NAME --ignore-table=DB_NAME.TABLE_NAME > file_name

Comments

Popular posts from this blog

Add Css And Js Files on Specific Page In laravel

Xpendy Pending

Laravel Join with two coloums