Sunday, January 10, 2010

Pass application user id to MySQL database??

In all our application we connect to MySQL database as single db user, and we need to pass the end user id to the mysql database?

So how can we pass it?

I've idea to create plugin to add mysql variables ex. "app_userid" and set it when user login??!!

but i don't have any idea how to create plugin?

Or do you have another idea??

Note: i don't want to change the application code, and i need it portable.

1 comment:

  1. Set a user defined variable with your application when it connects: