List:General Discussion« Previous MessageNext Message »
From:Carlos Williams Date:May 13 2009 3:05pm
Subject:Creating a New DB / User
View as plain text  
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)

Creating a New DB / UserCarlos Williams13 May
  • Re: Creating a New DB / UserMichael Dykman13 May