sql,query


At 11:49 +1000 9/24/02, vinita vigine Murugiah wrote:
>Paul DuBois wrote:
>
>>At 9:41 +1000 9/24/02, vinita vigine Murugiah wrote:
>>
>>>Hi paul
>>>
>>>Paul DuBois wrote:
>>>
>>>>At 9:05 +1000 9/24/02, vinita vigine Murugiah wrote:
>>>>
>>>>>HI Egor
>>>>>     OK, I want to create new databases, to do that I need
>>>>>database create privilege.
>>>>>
>>>>>Grant CREATE ON ######
>>>>>to ddb@localhost IDENTIFIED BY 'passwd'
>>>>>
>>>>>What should go into #####, is it a *? but I should NOT given
>>>>>permission to access other databases.
>>>>
>>>>
>>>>
>>>>No, it should be db_name.*
>>>
>>>
>>>Then I can ONLY create database called "db_name",  then every time
>>>when I create a database, I have to ask the root to give me create
>>>permission on xxx database. This is inconvenient. Is there any
>>>other work around??
>>
>>
>>As far as I can tell, you're not making any sense:
>>
>>- First you say you want to grant permission for a given database, and
>>    *NOT* to access other databases.
>>- Now you say you don't want to have to specify permissions for given
>>    databases.
>>
>>You can't have it both ways.  Do you want permission for a specific
>>database, or for all databases?
>>
>>If I am misinterpreting you, then please be more specific.
>
>HI sorry for the confusion.
>well...... I want to create a database where I can give *any* name
>(ofcourse, the database doesn't exist).
>
>Are you trying to say, I need to ask the root, to give me create
>privilege on database "xxx", even before it exist, then only I can
>create the database "xxx". Then every time when I want to create a
>new database, I need to ask the root to give create privilege ???

Well, yes, you need to have privileges on a database to be able to create
it.  However, if you have the global CREATE privilege, you can create *any*
database.  So maybe that's what you want.  The GRANT statement for
this will look like:

GRANT CREATE ON *.* TO ddb@localhost IDENTIFIED BY 'passwd';

*.* as a level specifier means "global".

Is that what you want?

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to