title: mysql queries run as root
body: <p>My situation is like this:
  I have two servers, one is a windows server running IIS and holds my web site.
  The other is a linux server that holds my mysql server.</p>
  
  <p>I created a (mysql) user on the mysql server with a minimum set of privileges, and I use its credentials when connecting from my website to run queries.</p>
  
  <p>But when I run a query, and check the processes that are running on the mysql server (mysql> show processlist), I see that the query I executes (from the web site) is being run under the (mysql) root account!</p>
  
  <p>Any idea why this should happen??</p>
  
  <hr>
  
  <p>Hituptony got it :-)
  My query was processed by a SP, and turned into a prepared statement and then run...
  That SP was defined with the root account (god knows why), and more ever didn't have the "invoker" security clause.</p>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.5/en/stored-programs-security.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.5/en/stored-programs-security.html</a></p>