List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:March 5 2005 12:01am
Subject:Re: mysqldump vs. 'mysql [db] > file.sql'
View as plain text  
In the last episode (Mar 04), Stembridge, Michael said:
> mysqldump vs. 'mysql [db] > file.sql'
> 
> I stumbled across the latter method early on but notice that most
> folks suggest using mysqldump instead; are there performance benefits
> with using mysqldump, or some other reason?

The latter can't generate a dump the way mysqldump can.  You can get
the definition with "show create table", but there's no way to
automatically generate INSERT statements with correctly-escaped output.
 
> The same question could be applied to using mysqlimport vs. 'mysql [db] <
> tablename.sql'.  

mysqlimport is basically a wrapper around "LOAD DATA INFILE".

-- 
	Dan Nelson
	dnelson@stripped
Thread
mysqldump vs. 'mysql [db] > file.sql'Michael Stembridge5 Mar
  • Re: mysqldump vs. 'mysql [db] > file.sql'Dan Nelson5 Mar