Developer Snippet Diary

IMPORT / EXPORT mysql database using cmd

IMPORT:

  1. open cmd where file is placed
  2. mysql -u root-p"rizi" clynxx_demo < clynxx_demo.sql
    
    #clynxx_demo  is databse
    #root is user
    #rizi is password
    #clynxx_demo.sql is file to import or need to give full path as D:/clynxx_demo.sql

OR

  1. open cmd
    mysql -u [username] -p [database_name]
  2. source C:\xampp\htdocs\SP\api_bagtheprice\drm_aux_db.sql

 

Export MYSQL DATA: export database using following cmd command 

mysqldump -u [username] -p [database_name] > [output_file].sql
Posted by: R GONDAL
Email: rizikmw@gmail.com