List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:March 29 1999 5:03pm
Subject:Re: Adding user accounts & databases
View as plain text  
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

Thread
mysql_refresh() ???Barry28 Mar
  • mysql_refresh() ???Michael Widenius28 Mar
    • Re: mysql_refresh() ??? - ThanksBarry29 Mar
  • Adding user accounts & databasesBasil Murphy29 Mar
  • Re: Adding user accounts & databasesChristian Mack29 Mar