7

How do I grant view-related privileges to a user in MySQL (without granting all privileges)? I get this error when I try to do a mysqldump:

mysqldump: Couldn't execute 'show create table `view_household`': SHOW VIEW command denied to user 'backup'@'localhost' for table 'view_household' (1142)
10

grant show view on *.* to 'backup'@'localhost'

1
  • 2
    Probably *.* it's a little wide. Usually with dbName.* is enough. – bistoco Jul 22 '19 at 22:20

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.