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" <daisleyj...@googlemail.com> > To: "mysql" <mysql@lists.mysql.com> > 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org