8

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) 

1 Answer 1

11

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

1
  • 2
    Probably *.* it's a little wide. Usually with dbName.* is enough. Commented Jul 22, 2019 at 22:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.