Problem with mysqldump (no data, only the database structure).
Posted on 2007-10-18
Hi guys hope you all are well :>)
Guys hope you can help me out on this one :>)
I have a problem trying to do a full backup of a mysql database.
The problem I have is not in the backing up of the STRUCTURE of the database, but in trying to backup BOTH the STRUCTURE and the DATA contained within the database.
I must be doing something wrong, so Im going to show you exactly what Im doing to see if you can pinpoint any mistakes im doing.
Just to reiterate, the following DOES successfully back up the STRUCTURE ONLY.
What I require is both the STRUCTURE and DATA.
Version of MySQL I am running is MySQL 5
# mysqldump -u root -p vbForum > vbForum.sql
When I run the above command, it prompts me for a password to authenticate as a user against the vbForum database.
I enter my password, and it dumps a 6MB file called vbForum.sql.
The problem is that there is only create table statements in here, and no data.
The file should be easily over 10MB, so Im not sure what other switches I need ot use in my mysqldump statement.
Any other help greatly appreciated.
Guys also, I want to be able to run this by script....that is, not have to log in to mysql and run a backup command through mysql, because I want to be able to schedule a script to run a mysqldump command to do this automatically every day.