Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

enter image description here Under syntax is correct or wrong!! please help .. GRANT ALL PRIVILEGES ON summy-database.* TO 'sammy'@'localhost' IDENTIFIED BY 'password';


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
479 views
Welcome To Ask or Share your Answers For Others

1 Answer

I think the problem is the - in the database name, in order to make that work you have to escape it with backticks.

Ex:

GRANT ALL PRIVILEGES ON `summy-database`.* TO 'ammy'@'localhost';

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...