I want to copy a live production database into my local development database. Is there a way to do this without locking the production database?
I'm currently using:
mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localhost my_db1
But it's locking each table as it runs.
Does the
--lock-tables=false
option work?According to the man page, if you are dumping InnoDB tables you can use the
--single-transaction
option:For innodb DB: