Andre MATOS <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I insert a new user to access the MySQL database. I have 4 databases plus 
> the mysql database. I want that this user can run the select instruction 
> just into one database, so I did this:
> 
> [prompt]$ mysql u root p
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 3147 to server version: 4.0.18-standard
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 
> mysql> USE mysql;
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
> 
> Database changed
> INSERT INTO user (Host, User, Password, Select_priv) VALUES ('%', 
> 'myuser', password('hispassword'), 'Y');
> mysql> GRANT ALL ON database2.* TO myuser;
> mysql> FLUSH PRIVILEGES; 
> mysql> quit;
> 
> 
> However, when I log using this new user myuser, I still can see the others 
> database and a can insert, update and delete records into all databases 
> instead of just have the rights to select in the database2. What I did was 
> correct or it is missing something?
> 

Use SELECT CURRENT_USER() to see username and hostname that current connection was 
authenticated
as.
Then check what privileges those user has with SHOW GRANTS statement:
        http://www.mysql.com/doc/en/SHOW_GRANTS.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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