Thomas,

Monday, January 28, 2002, 7:56:52 AM, you wrote:

TK> Hi I am new to MySQL

TK> I have installed MySQL on windows 200 swerver and installed MyODBC.

TK> I created a db and added a user with the grant command and added
TK> select,insert,delete,update privileges for the user.

mysql>> show grants for www;
TK> +---------------------------------------------------------------------------
TK> +
TK> | Grants for www@%
TK> |
TK> +---------------------------------------------------------------------------
TK> +
TK> | GRANT USAGE ON *.* TO 'www'@'%' IDENTIFIED BY PASSWORD '51d140c5511d64c5'
TK> |
TK> | GRANT ALL PRIVILEGES ON mycomax.* TO 'www'@'%'
TK> |
TK> +---------------------------------------------------------------------------
TK> +
TK> 2 rows in set (0.00 sec)

mysql>> show grants for www@'localhost';
TK> +---------------------------------------------------------------------------
TK> ----
TK> ----+
TK> | Grants for www@localhost
TK>     |
TK> +---------------------------------------------------------------------------
TK> ----
TK> ----+
TK> | GRANT USAGE ON *.* TO 'www'@'localhost' IDENTIFIED BY PASSWORD
TK> '51d140c5511d64
TK> c5' |
TK> | GRANT ALL PRIVILEGES ON mycomax.* TO 'www'@'localhost'
TK>     |
TK> +---------------------------------------------------------------------------
TK> ----
TK> ----+
TK> 2 rows in set (0.00 sec)


TK> I have added a DSN for the DB.

TK> Now when I try to connect to the db via ODBC it gives me access denied
TK> ***********************************************************
TK> [TCX][MyODBC] Acces denied for user: 'www@localhost' to database Mycomax
TK> ***********************************************************
TK> if i don't insert a username and password it works - this must be the
TK> anonymous user.

TK> What am I doing wrong here?

"USAGE" is a synonym for "no privileges". Your user has no privileges
on *.*. So when you try to connect as user 'www@localhost' identified by 
"your_password" to Mycomax - you get "access denied" :)

See: http://www.mysql.com/doc/G/R/GRANT.html





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to