Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

Tony Ho
Tony Ho
5,424 Points

Setting Up Multiple Users

I am getting an error code of 1044 access denied to user.

  1. I made a new user <code>

GRANT SELECT ON treehouse_movie_db.*
TO user1@'%'
IDENTIFIED BY 'password'; </code>

  1. flush privileges
  2. Made a new connection.
  3. connected
  4. Type in Use treehouse_movie_db

I get error code 1044

I do see that the treehouse_movie_db does not show up in the pane. Only a test db shows up. My XAMPP is running MYSQL. Of course the admin user can use the db.

2 Answers

Art Skupienski
Art Skupienski
7,080 Points

Hi Tony,

Make sure you have '127.0.0.1 localhost' in your hosts file.

GRANT ALL on . to 'root'@'127.0.0.1' identified by '$roots_password' WITH GRANT OPTION;

Good luck! Art

Tony Ho
Tony Ho
5,424 Points

If I remember correctly my port was set to 3307 on MYSQL server but 3306 in my script. So I guess it was not finding the db and kept telling me access denied. When I set the port to the 3306 on the server it worked.

Thanks for the response