Reputation: 6122
I have this command which is only creating statements to re-create the database and schemes, but it's not backing up any of the data:
"C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.0.6\mysqldump.exe" --user=myuser --password=mypassword --host=localhost --port=3306 --result-file="Z:\mysql-backup\backup.%date:~10,4%%date:~7,2%%date:~4,2%.sql" --default-character-set=utf8 --single-transaction=TRUE --databases "wpzb" "wptt"
What am I missing?
Upvotes: 0
Views: 209
Reputation: 346
With the basic command:
mysqldump -u myuser -pmypassword --databases wpzb watt > dump_file.sql
You should get all the data and schema in one file
It might be best to execute the command for each database separately:
mysqldump -u myuser -pmypassword --default-character-set=utf8 --single-transaction=TRUE wpzb > wpzb_dump_file.sql
This way you have the schema and data for one database in one file!
Since the database is local and on the default port you can just use:
-u myuser -pmypassword
And leave the localhost and port attributes off.
I tested with no-data=true in the my.ini file on Windows and running mysqldump now dumps no data.
my.ini
[client]
no-data=true
Upvotes: 1
Reputation: 116
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
Upvotes: 0