Your directive looks fine assuming dublin expects to always connect
from localhost.
One thing though: your user does not need the 'WITH GRANT OPTION' bit
as that gives them permission to gratn permissions to other users,
which I don't think is what you want.
- michael dykman
On Wed, May 13, 2009 at 11:05 AM, Carlos Williams <carloswill@stripped> wrote:
> I have used MySQL twice in my career so I did read the MySQL How-to
> page and just wanted to ask here if what I did as correct based on
> what I wanted to do. I just wanted to create a new database in MySQL
> called "webmail" and then also create a new user who limited to only
> accessing the 'webmail' database and nothing else. Can someone please
> tell me if I did this correctly or if I messed up and mis-understood
> the instructions. I am sure there are easier ways to do this via
> mysql-admin tool but I prefer to just try the way below unless its
> dead wrong...
>
> ===================================================================
>
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 437
> Server version: 5.0.45 Source distribution
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> show databases;
> +--------------------+
> | Database |
> +--------------------+
> | information_schema |
> | cal |
> | forums |
> | it |
> | mysql |
> +--------------------+
> 5 rows in set (0.00 sec)
>
> mysql> create database webmail;
> Query OK, 1 row affected (0.00 sec)
>
> mysql> grant all privileges on webmail.* to dublin@localhost
> identified by 'n0$n@ke$' with grant option;
> Query OK, 0 rows affected (0.00 sec)
>
> ===================================================================
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>
>
--
- michael dykman
- mdykman@stripped
- All models are wrong. Some models are useful.