How to take backup of a database in mysql? For Back up I have used the following commands.

mysqldump -u root -p[root_password] [database_name] &gt; dumpfilename.sql

mysqldump -u [username] -p[root_password] --single-transaction
 --routines --triggers --lock-tables [database_name] &gt; backup.sql;


Getting same error:


  mysqldump: Couldn't execute 'show table status like 'uc_order_products_pair_vw'': SELECT command denied to user 'username'@'localhost' for column 'nid' in table 'uc_order_products' (1143)


After running select * from mysql.tables_priv;
Can you try grant permission on whole database like,

GRANT ALL PRIVILEGES ON db.* TO 'username'@'%' IDENTIFIED BY 'yourpass' WITH GRANT OPTION;