I have active database with dozens of tables. Among them several are unused (no queries/insertions are performing over them for a while).
I want to dump that inactive tables. I would suggest that it will be harmless to use mysqldump -u.. -h.. -p... mydb tbl1 tbl2 > dump.sql
and nothing except that tables will be locked?
Thesqldump: dump several tables from db. what will be locked
backupMySQLmysqldump
Related Question
- Mysql – How to replicate a MySql server’s data without using thesqldump
- mysqldump Lock Tables – Does –lock-tables=false Work with MyISAM?
- Mysql – Do Inactive MySQL Databases Consume Memory
- MySQL Database Migration – Moving Large Databases with Mysqldump
- Thesqldump takes forever to dump tables from a remote server
- Mysql – Migrating 300 GB thesql database from one server to another cleanly with minimum downtime
- Mysql – What dump file options or MariaDB setting is slowing down the load of data
- Mysql – Consistent InnoDB dumps with thesqldump
Best Answer
Given the current way you are doing it
each table is locked during the SELECT phase in a specific way
Note the effects during the dump
If those tables (tbl1 and tbl2) are inactive, then such a dump would be harmless to busy tables.