Mysql database import and export command using putty(Linux)

@mit $ingh. February 11, 2015 Comments

Database export command

mysqldump -h 127.0.0.1 -u root -p database_name > file_name.sql


Export without data only structure.
mysqldump -h 127.0.0.1 -u root -p --no-data database_name > file_name.sql

 

Database import command

mysql -h 127.0.0.1 -u root -p database_name < file_name.sql

 

  • MySQL
  • mysql-export
  • mysql-import