List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:April 19 1999 4:56pm
Subject:Re: creating new users
View as plain text  
"David R. Saunders" wrote:
> 
> 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
> statements:
> 
> use mysql;
> 
> insert into user values('localhost','drs8h',PASSWORD('!!drs8h'),
> 'Y','Y','Y','Y','Y','Y','N','N','N','N','N','N','Y','Y');
> 
> insert into user values('%','drs8h',PASSWORD('!!drs8h'),
> 'Y','Y','Y','Y','Y','Y','N','N','N','N','N','N','Y','Y');
> 
> 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,
> Create_priv,Drop_priv,Index_priv,Alter_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

Hi Dave

The SQL wildcard character is '%' not '*'.
Replace your 'drs8h_*' with 'drs8h_%' and it will work.

Tschau
Christian

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