Page 1 of 1

Add user to mysql database issues!!!

Posted: Wed May 23, 2007 4:52 pm
by kingdbag
Hey,

I'm trying to add a user to a mySQL database and this is what I have so far:

User Host Password Global privileges Grant
atlanta % Yes SELECT No

When I try to log onto it from the server its running on its saying:

~]# mysql -u atlanta -p
Enter password:
ERROR 1045: Access denied for user: 'atlanta@localhost' (Using password: YES)

I have no idea what i'm doing wrong... Can someone help me?

Posted: Wed May 23, 2007 5:22 pm
by pickle
Are you setting up the user via the command line or with phpmyadmin?

If the command line, what happens when you run this query from the `mysql` database:

Code: Select all

SELECT
 *
FROM
 user
WHERE
 user = 'atlanta'
Your password should be encrypted using MySQL's password() command, so if the password is in plain text - there's your problem.

Also, if you use the

Code: Select all

[/code ] tags around command line stuff (such as database query results), it spaces things much nicer.

Posted: Wed May 23, 2007 5:53 pm
by kingdbag
I used phpMyAdmin to create the user.

I have reloaded the privlieges with phpMyAdmin

Code: Select all

FLUSH PRIVILEGES;

Posted: Wed May 23, 2007 6:09 pm
by Benjamin
Don't forget to reload the privileges, in phpMyAdmin, I believe it would be Reload MySQL

Posted: Wed May 23, 2007 6:18 pm
by kingdbag
Its working now....I read someplace that you need to add the user to localhost and also % I did that and it works... I think thats what fixed it.