programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
try another color:
try another fontsize: 60% 70% 80% 90%
Programming FAQs

How to Export the database in mysql using command prompt?

Average: 3.4 (5 votes)

login into your webhost

login into your webhost using ssh.

enter your username/password for the webhost

type below mysql command.

mysql -uUSERNAME –pPASSWORD DATABASENAME > MYDATABASE.sql

eg : username:root
password:pwd
databsename:mydb

mysql -uroot -ppwd mydb > mybackup.sql

above command will take the backup of mydb into mybackup.sql file.

u can use mysqldump comand

u can use mysqldump comand also

mysqldump -uusername -ppassword database name > export.sql