Hi all,

I have a question. I have created

===================mysql_command start==============================
mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
    -> identified by 'some_passwd';
===================mysql_command end==============================

the user can login no problem. but can see testdb

===================mysql_command start==============================
mysql> show databases;
+----------+
| Database |
+----------+
| mysql    |
| test     |
+----------+
2 rows in set (0.11 sec)

mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> use mysql;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> use testdb
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> use openwebmail;
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> quit

===================mysql_command end==============================

and then i did that with a root login

===================mysql_command start==============================
mysql> use testdb;
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
mysql> grant select,update on *.* to [EMAIL PROTECTED];
Query OK, 0 rows affected (0.00 sec)

===================mysql_command end==============================

But the testuser can actually view all databases. That's not what I really
want. I just want testuser can select and update testdb. But not others.

How can I restrict testuser only work on testdb?

Thanks.


Cheers,
Clive


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

Reply via email to