Tag Info

New answers tagged

2

You need to have the SHOW VIEW privilege. I wrote about this Dec 2013 : Which are the minimum privileges required to get a backup of a MySQL database schema? In that post I show these minimum privileges for a mysqldump SELECT SHOW VIEW (If any database has Views) TRIGGER (If any table has one or more triggers) LOCK TABLES (If you use an explicit ...


2

Export all the views of the database <DB>: mysql -BNe "SELECT TABLE_NAME FROM TABLES WHERE TABLE_SCHEMA = '<DB>' AND TABLE_TYPE = 'VIEW'" \ information_schema | xargs mysqldump --single-transaction --no-data <DB> >views.sql or: mysql -BNe "SELECT TABLE_NAME FROM VIEWS WHERE TABLE_SCHEMA = '<DB>'" \ information_schema | ...


0

Given the current way you are doing it mysqldump -u.. -h.. -p... mydb tbl1 tbl2 each table is locked during the SELECT phase in a specific way Note the effects during the dump Each table that is MyISAM should allow SELECTs but block INSERTs, UPDATEs and DELETEs While dumping tbl1, tbl2 is fully accessible While dumping tbl2, tbl1 is fully accessible ...


0

You need to use mysqldump option --where like this: mysqldump -uroot -p --where="id % 2 = 1" db users > C:\Users\User\Desktop\ololo.sql Give it a Try !!!



Top 50 recent answers are included