How to export the database dump in MySQL ?

Every developer have faced the problem in local development environment with data setup. As this is very complex, painful and time consuming process. so another option, We can ask our team member to share the database dump which is running on their machine. here is command to export database dump from MYSQL DB. How to Import the Database

Open terminal and go to mySQL server install dir and run the following command to export database dump

/usr/local/mysql-8.0.30-macos12-x86_64/bin/mysqldump -u root -p db2005 > db2211.sql

“/usr/local/mysql-8.0.30-macos12-x86_64/bin/” Path/location where MySql server is installed
“mysqldump” – command for database export
“-u root” root user
“-p” is it for password but will ask later
db2005 -> name of database which wanted to export
“> db2211.sql” path and name of export sql file

Leave a Comment

Your email address will not be published. Required fields are marked *