PDA

View Full Version : Granting access


Karnan
01-10-2004, 09:43 PM
When i type

Type in: GRANT ALL PRIVILEGES ON *.* to '%'@localhost IDENTIFIED BY '%';

I get

ERROR 1045: Access denied for user: '@localhost' <Using password: NO>

Anyone have any ideas? :(

Lurker_005
01-10-2004, 10:00 PM
should be '%@localhost' not '%'@localhost

Karnan
01-10-2004, 10:09 PM
changed it and still got same error.

Karnan
01-10-2004, 10:10 PM
GRANT ALL PRIVILEGES ON *.* to '%@localhost' IDENTIFIED BY '%';

Thats what it should be right?

Squiffy
01-10-2004, 11:03 PM
Did you log in as root? And is % your username and pwd?

Karnan
01-10-2004, 11:10 PM
How do i log in as root and is this how it should be..

GRANT ALL PRIVILEGES ON *.* to 'username@localhost' IDENTIFIED BY 'password';

?

Squiffy
01-11-2004, 12:31 AM
mysql -u root mysql

and I THINK you need to drop the quotes around the username bit... and don't forget grant option

GRANT ALL PRIVILEGES ON *.* to username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;