Log in

View Full Version : error 1045 when setting up


Velox Furor
10-03-2004, 02:50 AM
I appogize if this was answered elsewhere, i searched for about half and hour and cound not find anything. Anyway, when setting up the database and doing the whole -

GRANT ALL PRIVILEGES ON * TO Username@localhost IDENTIFIED BY 'Password' WITH GRANT OPTION;

I keep getting an error, yes i did enter in my own username and password, ive tried the entire setup atleast 5 times and i keep getting

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

So if anyone has any info it would be much appreciated, thanks

ReFro
04-07-2005, 06:06 PM
I keep getting the same error and I also tried
mysql -u root mysql
GRANT ALL PRIVILEGES ON *.* TO ****@localhost IDENTIFIED BY '****' WITH GRANT OPTION;
but then I get this
Query OK, 0 Rows affected <0.00 sec>
and it doesn't seem to do anything

Belfedia
04-08-2005, 12:35 AM
You must replace * or *.* by NAME of your Dbase, i think :)

sysadmin
04-08-2005, 06:45 AM
GRANT ALL PRIVILEGES ON <DBname>.<Table> TO <UserName>@<IP> IDENTIFIED BY '<Password>' WITH GRANT OPTION;

Where
-Dbname is an existing DB or any name you used to create a DB.
-UserName can be any user including root.
-IP can be any private, internal or external IP including localhost.
-Password MUST be the password assigned to the user.

Examples:

GRANT ALL PRIVILEGES ON eq.* TO velox@192.168.0.101 IDENTIFIED BY 'veloxpass' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON velius.* TO belfedia@localhost IDENTIFIED BY 'belfpass' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO guest@10.0.0.1 IDENTIFIED BY 'nopass' WITH GRANT OPTION;