Export and import dump database in MySQL with command line
Export and import dump database in MySQL with command line
Export dump database in mysql with command line
mysqldump -u username -p database_name > data-dump.sql
- username is the username you can log in to the database with
- database_name is the name of the database that will be exported
- data-dump.sql is the file in the current directory that the output will be
Import dump database in mysql with command line
mysql -u username -p new_database < data-dump.sql
Note: You must create database before import
Post a Comment