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! While you're at it, check out some resources Treehouse students have shared here.

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

Creating new users

Hi,

I am using MySQL Workbench 6.1 CE on Windows 7. I am not able to create a DB user on localhost. When I do ```GRANT SELECT ...user1... FLUSH PRIVILEGES

It creates the user correctly. Then when I create a new connection in the workbench, it lets me connect but then the treehouse_movie_db does not appear. When creating user1 connection, if I introduce the "store in vault", then when I test the connection and introduce the password again it says that the password is not correct.

Thanks!
Lluis

5 Answers

Mark Connelly
Mark Connelly
7,577 Points

This appears to be a MySQL bug connecting to the local host. Instead of using the '%' wildcard put the below code instead. This opened up the treehouse movie database to me on all of my tests.

user3 - DDL

GRANT ALTER, CREATE, DROP
ON treehouse_movie_db.*
TO user3@localhost
IDENTIFIED BY 'password';

FLUSH PRIVILEGES;

Hello, Mark. Can I ask you some questions?

  1. I run these code in root, then my admin USER appear the databases. But I don't why we have to do these in this way.
  2. Why I can't create new schema in my admin USER?

Why there are so many bugs.....T-T Thanks! Echo

Hi Mark, that code worked great! Thanks!

Mark Connelly
Mark Connelly
7,577 Points

I am experiencing these same troubles.

Hi Mark,

Thanks a lot! I'm going to try out...

Best, Lluis

Hi Mark, It worked! I just tried right now. Thanks again!

Lluis

Chris Komaroff
PLUS
Chris Komaroff
Courses Plus Student 14,198 Points

Thank you, Mark, I really appreciate it. Instructor is probably not aware of this issue (bug) when creating user for localhost.

Viki Pattanaik
Viki Pattanaik
6,314 Points

I agree, Video needs to be altered slightly to include this useful piece of information. Almost everyone is going to be trying with a localhost setup so excluding this vital bug in the workbench is kind of misleading.