hi

this question has been posted before but I have not yet found an answer suitable for my case.
I am not very knowledgeable concerning mysql so please excuse the simplicity of my questions.

I have a Mysql 4.0.18 database running on windows.
From another windows server (10.1.1.4), PhpMyAdmin connects to the mysql database using admin1 as login and the corresponding password.

However, this user can list all the databases that are hosted on the mysql server.

Below are some queries that I have run with respect to admin1. The most interesting part is the output of the statement:

show grants for 'admin1'@'10.1.1.4';

1. the only grant statement I type for this user is: GRANT SELECT, INSERT, UPDATE, DELETE ON `admindb`.* TO 'admin1'@'10.1.1.4'

How did the additional line get added: GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'admin1'
@'10.1.1.4' IDENTIFIED BY PASSWORD '56b208421693456' | ?

2. If I type: REVOKE ALL PRIVILEGES ON *.* FROM 'admin1'@'10.1.1.4';
admin1 is no more able to list the databases. But now another statement appears when I list the grants:

| GRANT USAGE ON *.* TO 'admin1'@'10.1.1.4' IDENTIFIED BY PASSWORD '56b2084216979f06' |

What does this statement mean and how did it get there ?

3. But if I restart the mysql service after revoking all privileges, admin1 can see the list once again.
What must I change to let user admin1 list and manipulate his database (admindb) only ?

4. Running mysql> SOURCE c:\mysql\scripts\mysql_fix_privilege_tables.sql does not fix the problem


Below are the privileges of admindb and the my.ini file.


I have also installed Mysql 5.0 on a separate machine. But the same problem occurs.


THANKS TO ANYONE WHO CAN HELP !!!




--------------------------------------------------------------------------------------------------------------



mysql> select * From db where user like 'admin1';
+-----------+------------+----------+-------------+-------------+-------------+--
-----------+-------------+-----------+------------+-----------------+------------
+------------+
| Host | Db | User | Select_priv | Insert_priv | Update_priv | D
elete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv
| Alter_priv |
+-----------+------------+----------+-------------+-------------+-------------+--
-----------+-------------+-----------+------------+-----------------+------------
+------------+
| 10.1.1.4 | admindb | admin1 | Y | Y | Y | Y
| N | N | N | N | N
| N |
+-----------+------------+----------+-------------+-------------+-------------+--
-----------+-------------+-----------+------------+-----------------+------------
+------------+
1 row in set (0.00 sec)









mysql> select * From user where user like 'admin1';
+-----------+----------+------------------+-------------+-------------+----------
---+-------------+-------------+-----------+-------------+---------------+-------
-------+-----------+------------+-----------------+------------+------------+
| Host | User | Password | Select_priv | Insert_priv | Update_pr
iv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Proces
s_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |
+-----------+----------+------------------+-------------+-------------+----------
---+-------------+-------------+-----------+-------------+---------------+-------
-------+-----------+------------+-----------------+------------+------------+
| 10.1.1.4 | admin1 | 56b208421693456 | N | N | N
| N | N | N | N | N | N
| N | N | N | N | N |
+-----------+----------+------------------+-------------+-------------+----------
---+-------------+-------------+-----------+-------------+---------------+-------
-------+-----------+------------+-----------------+------------+------------+
1 row in set (0.02 sec)








mysql> show grants for 'admin1'@'10.1.1.4';
+--------------------------------------------------------------------------------
-------------------------------------------------------+
| Grants for admin1@10.1.1.4
|
+--------------------------------------------------------------------------------
-------------------------------------------------------+
| GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'admin1'
@'10.1.1.4' IDENTIFIED BY PASSWORD '56b208421693456' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `admindb`.* TO 'admin1'@'10.1.1.4' |
+--------------------------------------------------------------------------------
-------------------------------------------------------+
2 rows in set (0.00 sec)




my.ini

-----------------------------------------------
[WinMySQLAdmin]
Server=C:/mysql/bin/mysqld-nt.exe

[mysqld]
port=3306
skip-locking


set-variable = max_connections=600
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
set-variable = flush_time=1800
set-variable = join_buffer=5M
set-variable = record_buffer=5M
set-variable = sort_buffer=8M
set-variable = table_cache=1024
set-variable = myisam_sort_buffer_size=32M
set-variable = thread_cache_size=128


#log-long-format
#log=Mysql_errors
log-slow-queries=slow_queries_log
long_query_time=2

----------------------------------------------------------