Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Database Foundations Securing and Maintaining a MySQL Database Setting up Multiple Users

Mayur Pande
Mayur Pande
Courses Plus Student 11,711 Points

Error Code 1064. Its says my db name is incorrect

It says my db name is incorrect syntax however this db name was generated through my web hosting provider. I have successfully connected to the db and can see the db in my workbench with the table. However when writing the grant statement it says I cannot have the minus operator within the db name. However as mentioned before my db name is automatically generated and I cannot create a database for some reason within php my admin. Here is the code I have wrote for the read access so far;

ON cl54-tommyt12.* #doesn't allow me to use this?
to user1@'%' #in my actual code I have changed this wildcard and the password fill in below
identified by 'password'