Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to add new user

Status
Not open for further replies.

msloan

Programmer
May 30, 2001
39
US
New to Mysql and I am trying to add a new user. I am using the MySQL Control Center to do this. Any time I try to add the new user to any database, I get the following error:

[admin] ERROR 1045: Access denied for user: '@localhost' (Using password: NO)

Any suggestions?
 
I right click on 'User Administration' and select 'New User'. I then provide a user name, the host and password. Then I select which database I want this user to be able to access.
 
Your error specifies "Using password: NO", yet you mentioned entering a password for your user.

It sounds to me like your user is not providing a password when he attempts to connect to MySQL.

How are you testing user access?



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I am not able to test the user access because I am not able to successfully create the new user.

As I understand it, the error relates to me as the current user '@localhost' which doesn't use a password. Right?
 
I am wondering if I am getting this error due to the initial configuration of MySQL? Or maybe from the way I am connection and trying to create the new user? As I said, I am new to MySQL - it does seem fairly straight forward, but it wouldn't surprise me if I messed something up.

Thanks!!!
 
Take a step back. Take a breath.

When you get this error, what application are you trying to use to connect to the server, and how are you invoking this application?



The "mysql" command-line tool, for example, requires that it be invoked with the "-p" or "--password=thepassword" (the difference being whether the app should ask you for the password or whether you are supplying it a invocation) if the user is required to supply a password when logging in. And if you supplied a password when you created the user, he will be required to supply a password when he connects to the database server.

If the user should supply a password but you don't use one of those options, the "mysql" app does not assume that it should ask you for a password and try to connect again. It just tells you the connection failed.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top