From: Christian Mack Date: March 29 1999 5:03pm Subject: Re: Adding user accounts & databases List-Archive: http://lists.mysql.com/mysql/1149 Message-Id: <36FFB26E.33359F4C@compal.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ) > 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