List:General Discussion« Previous MessageNext Message »
From:David R. Saunders Date:January 1 1970 12:00am
Subject:creating new users
View as plain text  
Mysql folks,

I've been trying to create users with access to databases which
begin with their userid, i.e., userid "drs8h" would have control
over any mysql database which begins with "drs8h_*".  I use the following

use mysql;

insert into user values('localhost','drs8h',PASSWORD('!!drs8h'),

insert into user values('%','drs8h',PASSWORD('!!drs8h'),

insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,
Create_priv,Drop_priv,Index_priv,Alter_priv) i
values ('localhost','drs8h_*','drs8h','Y','Y','Y','Y','Y','Y','Y','Y');

insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,
values ('%','drs8h_*','drs8h','Y','Y','Y','Y','Y','Y','Y','Y');

flush privileges;

Can anyone tell me what's wrong with this, or if what I'm trying to do
won't work at all?  Thanks.

Also, a more esoteric question: I noticed that client connections using mysql
won't work at all when the ~/.my.cnf file exists *and* when the user shell
invoking the command exists because of a prior "su -" command (i.e., there is
more than one "login" shell in the process group).  Anybody know what's the 
reason for this?

Thanks for your help,
Dave Saunders

creating new usersDavid R. Saunders19 Apr
  • Re: creating new usersBenjamin Pflugmann19 Apr
  • Re: creating new usersChristian Mack19 Apr