• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Unable to connect to MySQL

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if this is the correct forum, but I couldn't find a better one.

I have MySQL up and running. I created a new user, and attempted to connect using Hibernate. However, I keep getting Access Denied errors. I can't connect using the MySQL GUI Tools either with that user.

I'm not sure what I'm doing wrong. TIA.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like that user doesn't have access rights. Check the password and privilages for the user.
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I do that? I haven't set up MySQL before.

I just redid the password, and it still won't let me log on. So it must be some sort of permission issue.
[ November 17, 2008: Message edited by: Bai Shen ]
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fixed it. Turns out I had to specify a host for it to connect from.
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've run into the same problem with another MySQL database. I'm trying to connect the GUI Tools from another machine, and it won't let me. I did some googling and tried running the following logged in as root.

GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'pass" WITH GRANT OPTION;

AFAIK, that will allow me to connect to the db from anywhere. However, I keep getting back the same error.

ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO)

Any help would be appreciated.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(Using password: NO)



This phrase indicates that the client did not provide a password when attempting to connect. Make sure you supply a password when attempting to connect.
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it because I don't have a password set for my root user?

The error I got wasn't using the gui tools. That was running directly from the mysql window.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic