Question

Can someone please help me downloading a database from CPanel ? I have a website hosted using CPanel WHM. The database is huge. I want to make changes to the website. But would like to work on it locally. So I downloaded my website content. When I try to download the database, the download gets stopped in middle because of the huge size of the database. How can I download the full database?

Was it helpful?

Solution

Since the database is huge, it can't be downloaded through phpmyadmin.
To download only through phpmyadmin, additional parameters like: php execution time limit, mysql time limit, mysql cache size etc etc needs to increased in files like php.ini mysql.ini

Instead mysqldump can be used.

Login to your site using SSH. Eg:

>>ssh user@your_website.com
>>Enter password: your_password
>>mysqldump -u [uname] -p[pass] [dbname] > [backupfile.sql]    

[uname] Your database username
[pass] The password for your database (note there is no space between -p and the password) [dbname] The name of your database
[backupfile.sql] The filename for your database backup

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top