Re: Quering user privileges

2003-12-27 Thread Plinio Conti
Yes, a cron job will make the solution more robust. I'm new to *classic* client-server DB apps and I'm still amazed for a so standard issue I have to find tricks. Particularly I wonder at this: standard SQL commands exist to assign (GRANT) and remove (REVOKE) privileges, but there is not a SQL

Re: Quering user privileges

2003-12-27 Thread Jim Richardson
On Sat, Dec 27, 2003 at 05:40:46PM +0100, Plinio Conti wrote: Yes, a cron job will make the solution more robust. I'm new to *classic* client-server DB apps and I'm still amazed for a so standard issue I have to find tricks. Particularly I wonder at this: standard SQL commands exist to assign

Re: Quering user privileges

2003-12-24 Thread Plinio Conti
On Tue, 23 Dec 2003 18:20:53 -0600 Paul DuBois [EMAIL PROTECTED] wrote: I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exaclty what you expect to do reading mysql manual. I agree, one might easily come to that conclusion based on the wording. The manual

Re: Quering user privileges

2003-12-24 Thread Plinio Conti
. The route your taking will be slower,more resource intensive and more complicated. - Original Message - From: Plinio Conti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 11:58 AM Subject: Re: Quering user privileges To be honest, the fact I can't

Re: Quering user privileges

2003-12-24 Thread Michael Stassen
Plinio Conti wrote: Yes, I think I will do it with an additional table on the db server, for the moment (I have no time to implement parsing etc...) The problem is, like you stated, to mantain that table up to date with changes in system tables. The best solution would be a trigger for this, but

Re: Quering user privileges

2003-12-23 Thread Egor Egorov
Plinio Conti [EMAIL PROTECTED] wrote: The manual page at http://www.mysql.com/doc/en/SHOW_GRANTS.html says: To list grants for the current session one may use CURRENT_USER() function But if I run SELECT SHOW GRANTS FOR CURRENT_USER(); I get syntax error (Error 1064). While if I

Re: Quering user privileges

2003-12-23 Thread Plinio Conti
. - Original Message - From: Plinio Conti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 21, 2003 5:55 PM Subject: Quering user privileges Is there a way to query the privileges of current user if he hasn't the rights to read the mysql system tables (user, db, hosts, etc

Re: Quering user privileges

2003-12-23 Thread Plinio Conti
Sorry, I was not using any SELCT in my queries, it's just an error typing the email I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exaclty what you expect to do reading mysql manual. On Tue, 23 Dec 2003 12:47:11 +0200 Egor Egorov [EMAIL PROTECTED] wrote: Plinio

Re: Quering user privileges

2003-12-23 Thread Egor Egorov
Plinio Conti [EMAIL PROTECTED] wrote: Sorry, I was not using any SELCT in my queries, it's just an error typing the email I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exaclty what you expect to do reading mysql manual. It means that you can use

Re: Quering user privileges

2003-12-23 Thread Plinio Conti
To be honest, the fact I can't get it with only one query but I have to do: 1) SELECT CURRENT_USER(); 2) SHOW GRANTS FOR valueExtractedByPreviousQuery; is a little thing compared with work remaing to get usefull information: I have to parse the strings returned by query 2, handle the wildcards,

Re: Quering user privileges

2003-12-23 Thread jamie murray
user privileges To be honest, the fact I can't get it with only one query but I have to do: 1) SELECT CURRENT_USER(); 2) SHOW GRANTS FOR valueExtractedByPreviousQuery; is a little thing compared with work remaing to get usefull information: I have to parse the strings returned by query 2

Re: Quering user privileges

2003-12-23 Thread Paul DuBois
At 15:46 +0100 12/23/03, Plinio Conti wrote: Sorry, I was not using any SELCT in my queries, it's just an error typing the email I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exaclty what you expect to do reading mysql manual. I agree, one might easily come to that

Re: Quering user privileges

2003-12-23 Thread Michael Stassen
Paul DuBois wrote: At 15:46 +0100 12/23/03, Plinio Conti wrote: Sorry, I was not using any SELECT in my queries, it's just an error typing the email I confirm: SHOW GRANTS FOR CURRENT_USER(); does not work, while that query is exactly what you expect to do reading mysql manual. I agree, one

Re: Quering user privileges

2003-12-22 Thread Egor Egorov
Plinio Conti [EMAIL PROTECTED] wrote: Is there a way to query the privileges of current user if he hasn't the rights to read the mysql system tables (user, db, hosts, etc..) I mean, I CAN'T give a standard user the chance of read system tables! But my client app wants to know if the

Re: Quering user privileges

2003-12-22 Thread Plinio Conti
Thank you! That is what I was looking for! Unfortunatly that command is not SQL 92 or SQL 99 standard, isn't it? (at least I guess, after I quick search in my ANSI files, BTW I think if they had put in MySQL documentation a note for each SQL command where is specified standard compliance that

Re: Quering user privileges

2003-12-22 Thread Plinio Conti
The manual page at http://www.mysql.com/doc/en/SHOW_GRANTS.html says: To list grants for the current session one may use CURRENT_USER() function But if I run SELECT SHOW GRANTS FOR CURRENT_USER(); I get syntax error (Error 1064). While if I run directly SELECT SHOW GRANTS FOR [EMAIL

Quering user privileges

2003-12-21 Thread Plinio Conti
Is there a way to query the privileges of current user if he hasn't the rights to read the mysql system tables (user, db, hosts, etc..) I mean, I CAN'T give a standard user the chance of read system tables! But my client app wants to know if the current user has (for example) the rights to

Re: Quering user privileges

2003-12-21 Thread jamie murray
be a connection to the database from the client when viewing the file. - Original Message - From: Plinio Conti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 21, 2003 5:55 PM Subject: Quering user privileges Is there a way to query the privileges of current user if he hasn't