Jason Joines <[EMAIL PROTECTED]> wrote:
>        We have a web server where users connect to mysql in scripts, etc., via 
> the host name localhost.  We would also like for them to be able to 
> manage their databases from their office dekstops with various 
> utilities.  If we grant rights to [EMAIL PROTECTED], they can connect 
> from the web/mysql server itself but not from other locations as 
> expected.  However, if we grant rights to username@'%', they can connect 
> from any host other than the web server.  To allow connections from any 
> host (including the web/mysql server, localhost) we have to try and keep 
> two sets of permissions synchonized for each user, [EMAIL PROTECTED] 
> and [EMAIL PROTECTED], effectively doubling the number of users we have to manage.
>        Is there any way to allow connections from both the localhost and any 
> other host with one set of permissions per user?

When you connect from local box you can use '127.0.0.1' instead of 'localhost'.

$ mysql -uegor
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)

$ mysql -uegor -h127.0.0.1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| [EMAIL PROTECTED]         |
+----------------+
1 row in set (0.00 sec)




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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to