Rune wrote:To speed up a dump, you can use> I have two MySQL databases on different servers and computers. I often need
> to move a number of tables from one database to the other database. So far I've
> been using "mysqldump" to make a backup, and "mysql" to load the backup in
> the other DB, but the amount of data is fairly large and it is very slow. Is
> there a faster method? I though of simply copying the database files, but
> the two database servers are not the same version, so I don't know how that
> will work.
mysqldump --opt -u USER -pPASSWORD database_name table_name > file.sql
That way, mysqldump will try all the known tricks to minimize the rebuild time.
If you were already using that option and it's still too slow for your needs, you may
want to consider tion instead of dumping tables.
Copying tables is a tricky business. To get a clean copy, you should stop the server,
copy the tables and restart the server. Or you could flush the tables, lock them all
and copy with the server still running. mysqlhotcopy will do the dirty work for you
However, it works only for MyISAM tables, and only on Unix and Netware systems.
Table formats are backward compatible, i.e. a table from a 4.0 server will be read
and understood by a 4.1 server, but not the other way around.
_ _ _ _
(_|| | |(_|>< The Data Charmer