"Marcin Blazowski" <[EMAIL PROTECTED]> wrote:
> "Marcin Blazowski" <[EMAIL PROTECTED]>> wrote:
>>> I've created a database and a user with ALL PRIVILEGES and GRANT OPTIONS
> to
>>> that database. When logon with that new user and want to create a new
> user
>>> with some privileges a get an error.
>>>
>>> How I do it:
>>>
>>> mysql> grant all privileges on temp.* to [EMAIL PROTECTED] identified by
>>> 'haslo' with grant option;
>>> Query OK, 0 rows affected (0.00 sec)
>>>
>>> Now, I logon as user temp and create database temp:
>>>
>>> mysql> create database temp;
>>> Query OK, 1 row affected (0.01 sec)
>>>
>>> And finally I try to give some of my privileges to user temp2:
>>>
>>> mysql> grant insert on temp.* to [EMAIL PROTECTED] identified by 'haslo';
>>> ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'mysql'
>>>
>>> And I get an access denied error.
>>>
>>> What's wrong? I know that it should work but it doesn't.
>>> It works with MySQL 4.0.12 compiled by me from sources on RedHat.
>>> It doesn't work with 3.23.49 installed from deb on Debian.
>>> It doesn't work with 4.0.12 installed from binary distribution on
> Windows
>>> 2000.
>>>
>>> I think it is because of a configuration of MySQL. But what I have to
>>> change? Maybe it is something else?
> 
> 
>> User must have UPDATE privilege on the database mysql to grant rights to
> other users.
> 
> But if I give UPDATE privilege on the database mysql to someuser he will be
> able to change root password.
> 1. How can I create user who will be able to grant rights to other user
> without possibility to change passwords in mysql.user?

To be able give permissions to other users you should have UPDATE privilege and GRANT 
option.

> 2. Why everything works like I expect (I can grant privileges with the way
> described above, User doesn't have UPDATE privilege) on my MySQL compiled
> from sources on RedHat?

Could you be more detailed? Show me an example, i.e. what permissions does user have? 

> 3. Why it doesn't work on MySQL installed from binary distribution? Are
> there some interesting things in mysql_install_db script?

mysql_install_db just creates privilege tables and adds the rows for 'root' and 
anonymous user. 


-- 
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