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.
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.
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
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.