Re: Minimum permissions for Log and DB

From: Date: Fri, 17 Mar 2006 19:08:00 +0000
Subject: Re: Minimum permissions for Log and DB
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23340@lists.php.net to get a copy of this message
Justin Patrin wrote:
On 3/16/06, Bruno Barberi Gnecco <brunobg@gmail.com> wrote:
Hi,
       What is the minimum set of permissions that the database user needs
for Pear::Log? It seems that just giving permission for insert/update/ select on the log table is not enough, since Pear::DB uses some mechanism to increment the sequence counter that requires more than that...
If you're using PEAR::DB's sequence emulation it's going to try to create a table named "tablename"_seq where "tablename" is the name of the table. Give that user permission to create tables for the first run and look at what it created. For any further tables you may need just create a similar sequence table in advance.
Okay, this seems to be the permissions required, for user 'logger', database 'dbname' and table 'log_table': GRANT SELECT, INSERT, UPDATE ON dbname.log_table TO 'logger'@'localhost' GRANT SELECT, UPDATE, CREATE ON dbname.log_id_seq TO 'logger'@'localhost' I hope this is it. Who would be responsible for the documentation or the development of Log::DB? -- Bruno Barberi Gnecco <brunobg_at_users.sourceforge.net> What's all this bru-ha-ha?

« previous php.pear.general (#23340) next »