I'd like to use mysqldump to back up my database and have written a script to do this by dropping into a shell and issuing a mysqldump statement. Is there a way to get the same dump but without using a shell? Isn't there a way I can use straight SQL to do this?
+1
A:
You can select the raw data into an outfile (using SELECT ... INTO OUTFILE), but I don't believe there's a way of doing a full 'schema with inserts' style dump.
middaparka
2010-01-01 12:48:44
Ok.. that's what I figured. Let me ask you another question. I have had bad experiences in the past with csv files not loading the data properly. I have never had that sort of experience using a dump file which was why I decided to go the route I went. Do you have any preference between the two methods?
Jim
2010-01-01 12:50:55
It depends what you want it data for - if it's for backup purposes, I always go the dump file route.
middaparka
2010-01-01 12:52:50
Yeah, these will be backups. I'd have to agree with you. I'll stick with the mysqldump. Thanks.
Jim
2010-01-01 12:58:48