Jump to content
xisto Community
Sign in to follow this  
hihihihi88

How Can I Backup MySQL Database On Cpanel? a silly question

Recommended Posts

I dont know how to backup the database to my computer ,

in cPanel i click "export" (is that right), but i can't back the file to my computer >.<

<{POST_SNAPBACK}>


Ok.. first of all this method is very very inconvenient. So apply for a SSH Shell in the Hosting Request Forum.

 

Once you get SSH Access, download PuTTy - a secure shell terminal from:

a. http://forums.xisto.com/no_longer_exists/ OR

b. http://www.putty.nl/download.html

 

Use that to login into your Xisto account. Once you are logged in and reach the shell type the following:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-jailshell-2.05b$ mysqldump -u YourUsername -pYourPassword --all-databases > YourBackupFile.sql

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 

Notice the underlined parts above. In the statement above, you should replace YourUsername with you own cPanel username, and YourPassword with the corresponding cPanel password. The YourBackupFile.sql should be replaced with an appropriate name for your backup file. Also notice the fact that when you are specifying your username with the -u option, there IS A SPACE BETWEEN "-u" and your "username" BUT THERE IS NO SPACE BETWEEN "-pYourPassword" i.e. between "-p" and YourPassword.

 

Now all you need to do is, download this .sql file onto your local hard drive and run it through MySQL - and you'd have an exact replica of the MySQL database that's residing on your webhost.

 

NOTE: This will backup ALL the MySQL databases you have into that file. In case you want to backup only a few selected databases, use the "--databases" option followed by the database names instead of "--all-databases". The statement then, would take the form:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-jailshell-2.05b$ mysqldump -u YourUsername -pYourPassword --databases database1 database2 > YourBackupFile.sql

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 

Hope this helps. Believe me, there's not a more convenient way than this to back your MySQL databases up.... Have fun ;)

Share this post


Link to post
Share on other sites

  Ok.. first of all this method is very very inconvenient. So apply for a SSH Shell in the Hosting Request Forum.

 

    Once you get SSH Access, download PuTTy - a secure shell terminal from:

a. http://forums.xisto.com/no_longer_exists/ OR

b. http://www.putty.nl/download.html......

thank you very much , good information for me ^^

 

Open phpMyAdmin and use their export feauture. You can have it create an sql file and even compress it.

I have open phpMyAdmin but i dont know how to export . In the export panel I dont how to export to my computer.... >.<

Share this post


Link to post
Share on other sites

Coder is right, it’s that simple and I have done it more than once. Select backup from your cpanel, and then click on the database you want to backup.It will give you the option to save the backup as a *.gz file and let you chose where to save it on your computer.

Share this post


Link to post
Share on other sites

hihihihi88: I think you should follow coder2ks advice and use phpMyAdmin to back it up. The method I've mentioned here albeit gives you much more flexibity and control, but is far more compicated and is meant for a little MySQL users. Once you start getting hang of all the MySQL commands and syntaxes - you could try using my method.

 

Meanwhile I suggest (whether you are running on Linux or Windows) you to grab a copy of MySQL ( http://www.mysql.com/ ), if you dont have one already - and try out all this on your home computer. That will somewhat familiarize you with the working environment and you'll see light for sure ;) There are lots of good documentation too on their site and a very helpful & dedicated MySQL support forum too - so you won't be left groping in the dark.

 

All the best ;)

Share this post


Link to post
Share on other sites

phpmyadmin is the way. but don't forget to tick the "export data" option. ortherwise you'll just have your structure (tables). you'll have an sql file that you can import later on. it's fast & easy.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.