List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:June 3 2011 11:40am
Subject:Re: Allowing all users to access a specified database
View as plain text  
Granting to ''@'%' and putting a password on that 'user' works fine - the password stops
just anyone from getting in; but the emtpy username in the db table should get picked up
fine, as authentication and authorisation are disctinct in MySQL.


----- Original Message -----
> From: "John Daisley" <daisleyjohn@stripped>
> To: "mysql" <mysql@stripped>
> Sent: Friday, 3 June, 2011 1:32:35 PM
> Subject: Re: Allowing all users to access a specified database
> 
> You could easily write a script which queries the mysql grant tables
> and
> grants the required permissions to every user on your system.
> Granting
> access the way you were suggesting gives the whole world access not
> just
> users of the system.
> 
> That said as that is a shared database which all users are dependent
> upon I
> would consider using stored procedures to do the tasks your users
> need to
> carry out on the shared database. Then you don't have to grant users
> access
> at all.
> 
> To use stored procedures create a `stored procedure` user and grant
> only
> that user appropriate access permissions to the database. Then create
> stored
> procedures to do the tasks your users would normally do and within
> the
> stored procedure set DEFINER to the `stored procedure` user you
> created and
> specify SQL SECURITY DEFINER.  Finally grant your other users EXECUTE
> permissions for the stored procedures.
> 
> Users get the access they need and security is a little tighter :)
> 
> You should also find Stored Procedures execute a little faster :)
> 

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
Thread
Allowing all users to access a specified databaseMark Goodge3 Jun
  • Re: Allowing all users to access a specified databaseJohn Daisley3 Jun
    • Re: Allowing all users to access a specified databaseMark Goodge3 Jun
      • Re: Allowing all users to access a specified databaseJohn Daisley3 Jun
        • Re: Allowing all users to access a specified databaseJohan De Meersman3 Jun
  • Re: Allowing all users to access a specified databaseJohan De Meersman3 Jun