I'd like to be able to move mysql data from one db to another. I only want to move records where account_id=1234
except for tables like account
which does not have an account_id
column.
Is there any possible way to do this?
MySQLmysqldump
I'd like to be able to move mysql data from one db to another. I only want to move records where account_id=1234
except for tables like account
which does not have an account_id
column.
Is there any possible way to do this?
Best Answer
By "move" do you mean "copy"? That is, are you leaving the rows behind?
Two different machines
mysqldump
has options to specify particular a database and list of tables. It also has an optionalWHERE
clause. So...(Please verify the syntax.)
Then load those two files into some other place (after doing
CREATE DATABASE newdb
):Same machine