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

Warning using GRANT SELECT on MYSQL Workbench 6.3

I was following the video through and when I came to use run the GRANT SELECT for user1 I got the following warning

GRANT SELECT ON treehouse_movie_db.* TO uers1@'%' IDENTIFIED BY 'paasword'
0 row(s) affected, 1 warning(s): 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.

I am using MySQL Workbench 6.3. Do I need to use the key words CREATE USER?

2 Answers

Sujoy Singh
Sujoy Singh
10,620 Points

GRANT was deprecated for the 5.7 version. Use CREATE to create new users. Heres the documentation: http://dev.mysql.com/doc/refman/5.7/en/create-user.html

Well at the moment it is just a warning, so it will still work in this version of MySQL, but obviously you should figure out how to do it with the suggested syntax so you can continue to do it in future versions.