0

For Back up I have used the following commands.

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

mysqldump -u [username] -p[root_password] --single-transaction
 --routines --triggers --lock-tables [database_name] > 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;

enter image description here

1

Can you try grant permission on whole database like,

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

This seems to be an authorization/rights issue.

Please give the necessary grants to the user 'username' as follows:

GRANT SELECT ON uc_order_products TO 'username'@'databasename';

OR

GRANT SELECT ON uc_order_products TO 'username';

Hope this helps !!

  • thanks for reply. But still getting the same issue. – DRUPWAY Jul 14 '16 at 9:29
  • Okay. Could you try with the altered commands (-f option for force backup): mysqldump -f -u root -p[root_password] [database_name] > dumpfilename.sql; mysqldump -f -u [username] -p[root_password] --single-transaction --routines --triggers --lock-tables [database_name] > backup.sql; – Bibhuti Bhusan Padhi Jul 14 '16 at 9:50
  • Also run the query --> select * from mysql.tables_priv; and check what all grants have been given on table-level and column-level. Then issue those grants to the user with which you are performing the backup. – Bibhuti Bhusan Padhi Jul 14 '16 at 10:00
  • i have added the image after run the above query. Also tried force backup but i think it is miss some part in backup. Process completed with some error. – DRUPWAY Jul 14 '16 at 10:18
  • Okay. I guess a View uc_order_products also exists. So you have to grant the SELECT rights to the user fro that also. – Bibhuti Bhusan Padhi Jul 14 '16 at 10:21
0

mysqldump -u [username] -p[root_password] --ignore-table=israelca_isr1qaz_2.uc_order_products_pair_vw --ignore-table=israelca_isr1qaz_2.uc_views_marketing_test --ignore-table=israelca_isr1qaz_2.uc_order_products_user_vw --ignore-table=israelca_isr1qaz_2.uc_order_products_qty_vw israelca_isr1qaz_2 > backup.sql;

Take backup of only tables and ignore the views.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.