user can see more than it's allowed to see?

2006-06-21 Thread Bing Du
Hello,

I don't understand why user 'test1user' can see database 'test' as well. 
I think user 'test1user' should only be able to see database 'test1'. 
What did I do wrong here?  I'd appreciate any help.  Thanks.

As root:

mysql show databases;
+---+
| Database  |
+---+
| LTM   |
| dummy |
| mysql |
| test  |
| test1 |
+---+
8 rows in set (0.00 sec)

mysql grant all on test1.* to [EMAIL PROTECTED] identified by 'test1user';
Query OK, 0 rows affected (0.06 sec)

mysql show grants for [EMAIL PROTECTED];
+--+
| Grants for [EMAIL PROTECTED]|
+--+
| GRANT USAGE ON *.* TO 'test1user'@'localhost' IDENTIFIED BY PASSWORD
'3b8031664a43a963'  |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER ON `test1`.* TO 'test1user'@'localhost' |
+--+
2 rows in set (0.00 sec)

As user test1user:

mysql show databases;
+--+
| Database |
+--+
| test |
| test1|
+--+
2 rows in set (0.00 sec)

Bing


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



Re: user can see more than it's allowed to see?

2006-06-21 Thread Barry

Bing Du schrieb:

Hello,

I don't understand why user 'test1user' can see database 'test' as well. 
I think user 'test1user' should only be able to see database 'test1'. 
What did I do wrong here?  I'd appreciate any help.  Thanks.


As root:

mysql show databases;
+---+
| Database  |
+---+
| LTM   |
| dummy |
| mysql |
| test  |
| test1 |
+---+
8 rows in set (0.00 sec)

mysql grant all on test1.* to [EMAIL PROTECTED] identified by 'test1user';
Query OK, 0 rows affected (0.06 sec)

mysql show grants for [EMAIL PROTECTED];
+--+
| Grants for [EMAIL PROTECTED]|
+--+
| GRANT USAGE ON *.* TO 'test1user'@'localhost' IDENTIFIED BY PASSWORD
'3b8031664a43a963'  |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER ON `test1`.* TO 'test1user'@'localhost' |
+--+
2 rows in set (0.00 sec)

As user test1user:

mysql show databases;
+--+
| Database |
+--+
| test |
| test1|
+--+
2 rows in set (0.00 sec)

Bing



database test itself has Grants that it shows itself to everyone.

You have to set this in the table database.

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: user can see more than it's allowed to see?

2006-06-21 Thread Bing Du

 database test itself has Grants that it shows itself to everyone.


How should I verify that?

Thanks,

Bing

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