Basil Murphy wrote:
>
> Hi everyone,
>
> I just cannot figure out how to do a seemingly simple task. I need to
> setup mysql with 81 user accounts ( each account gets one database to
> work with ).
>
> I know how to create the databases ( mysqladmin create <db name> )
> but how do I add users with permissions only on a given database?
>
> eg:
>
> Name, Database
> Jane Doe, janes_db
> John Doe, johns_db
> etc...
>
> I am _really_ hoping there is a command line to this so I can write a
> script to handle it for me ( just give it the list of usernames ).
>
> Any help is greatly appriciated,
> Basil
Hi Basil
Search after GRANT syntax in the mysql manual.
Example:
GRANT
ALL PRIVILEDGES
ON
janes_db.*
TO
'Jane Doe'
IDENTIFIED BY
'Jane Doe Password'
WITH GRANT OPTION
With this syntax you don't even need to reload the priviledges, because this is
done implicitely.
Tschau
Christian