John, Thursday, February 28, 2002, 1:56:29 PM, you wrote: >>JH> i like to have a DB per user so i do >> >>JH> GRANT ALL ON username.* TO username@"%" IDENTIFIED BY 'password'; >> >>JH> This is fine, until the user tries to connect from localhost :( >>JH> As i read the manual i think the %-wildcard includes localhost . >>JH> But i can not get it to work that way :( >>JH> My users have to have access from localhost and remote hosts to this DB. >> >>'%' means that you can connect via TCP/IP; JD> '%' is a wild card character meaning any
Correct, but '%' is used only for TCP/IP connections and not for unix domain sockets. According to the documentation: If you can't figure out why you receive Access denied message remove all entries that have Host values containing wild cards (entries that contain `%' or `_') from the user table. The very common error is to insert a new entry with Host='%' and User='some user', implying that this will allow you to specify the localhost for connection from the same machine. The reason this doesn't work is that the default privileges include a Host='localhost' and User='' entry. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to remove the entry with Host='localhost' and User=''. Maybe you will want to take a look at where the cite is from: http://www.mysql.com/doc/A/c/Access_denied.html >>'localhost' means connection via Unix socket. JD> Windows does not have UNIX sockets so what does localhost mean on Windows On all Windows platforms MySQL uses TCP/IP and named pipes for local connections on Windows NT/2000. Look at: http://www.mysql.com/doc/W/i/Windows_running.html >>JH> Joerg -- 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