1

enter image description here

I am a learner with Magento i have created dummy website on my localhost Xmapp server. Now i want to move it to live server but when i am exporting Mysql data base it is directly downloaded in sql and for importing data in cpanel i required databse in .sql.zipped or .sql.gzipped. Please guide me how can i import my data in cpanel.

screenshot attached

  • you can import data in sql file format. no need to in zip format – shail Jul 4 '18 at 7:22
  • But when i am uploading sql file its showing error. – Vibha Jul 4 '18 at 7:24
  • what error its show ? – shail Jul 4 '18 at 7:25
  • i.stack.imgur.com/wE25d.jpg please refer the link also screenshot uploaded – Vibha Jul 4 '18 at 7:31
1

Your exported sql file is corrupted.

Try exporting the database using mysqldump

Open xampp window and click on shell button as shown in the following screenshot.

enter image description here

After clicking on shell button, it will open a shell window.

Enter following command in the shell.

mysqldump -u USERNAME -p DATABASE_NAME > db_backup.sql

You will get your sql file in your xampp folder

e.g. D:/xampp/db_backup.sql
0

after enter command it is asking for password as for my memory i am not created any password for database.after enter command it is asking for password as for my memory i am not created any password for database.

0

Open a terminal window and in your MySQL path. After enter the next command with your own data:

  • sudo mysqldump -h HOSTNAME -u MYSQL_USERNAME -p DATABASENAME > /PATH_TO_SAVE/BACKUP_NAME.sql

For example: sudo mysqldump -h localhost -u root -p magento > /Users/mymacbook/Downloads/db_back.sql

Terminal will ask you for password, use the mysql user password.

It works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.