Quick question about mysql file size

I read the “Backup MySQL” section on DH Wiki, and did a backup as outlined using phpMyAdmin. It seemed to download quickly, and the downloaded file opens without any problems.

When I log in to my DH panel and look at my mySQL Databases, my database shows as 10.24MB. When I export it from phpMyAdmin, the file is 6MB. Is this normal? I did not use any compression. Does this mean that I do not have a complete backup?
I clicked Select All as instructed.

I noticed on the wiki that it was not recommended to use phyMyAdmin for downloading databases larger then 8MB, so this is why I am asking. I am nervous about using mysqldump since I have never done that before. Doesn’t dump mean delete? I’m so afraid of messing something up.

Thanks for reading this. Any input is appreciated.

This is normal. The size in the panel reflects the amount of storage used on the database server, which can include some overhead such as indexes and unused space. As the backup file does not need to include this information, it is often smaller than the raw data.

Thank you for your reply.

Hello again! My database is now up to just over 16MB and I am wondering if I should be backing it up from the shell. I have read the instructions under Getting a Backup From the Shell in the Backup MySQL wiki, but I am confused about how/where to do this. The wiki shows this:

[quote] * Log into your server with SSH

host name: servername.dreamhost.com login as: username (see Enabling Shell Access for users)

* Type the following command using your database user: 
* Log into your account with FTP and download the newly created output.sql file, which should be located in the root. Refresh your FTP view if necessary.[/quote]

I am a Linux user. I read the SSH wiki page and see that to log into the server I would type the following into a terminal window:

Please tell me, is this what I do? In terminal type:



then I will be prompted for a password (?)


I am nervous about potentially corrupting my database and just want to be sure I do not crash my website. Your help is very appreciated. Thank you!

You log into your server by typing this:

That will prompt you for a password, which you enter. You don’t have to enter the hostname or anything else, as you already did that with the @yourdomain.com part of the command above :slight_smile:

Thank you for your time and reply. Do I then type the following in my terminal window?

mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > output.sql

If so, is the username/password entered here the mysql user/password? My mysql user is different from my account user.

Additionally, I just noticed, my account user is set to sftp. Does it need to be set to shell to do this?

Is there anything else I do? I’m so worried about messing up my database and crashing my site. Your help is appreciated.

bump Can someone please advise? I haven’t backed up my database for about 3 weeks, and I would like to make sure I do this correctly. I appreciate your help and apologize for the ignorant questions. Thank you!

That’s correct, you login with a shell account using the “user” credentials, then use the user/pass/host Database credentials within your mysqldump command.

Your questions are far from ignorant. Quite to the contrary.

Thank you, sXi. I really appreciate your help.

Almost 2 months later and I still have not been brave enough to use shell. Maybe a stupid question but just to be sure… Can I replace the word ‘output’ with something else, say my database name, or does it have to be entered as output.sql?