Maybe I am missing something, I am misunderstanding something about MySQL-PHP connections... I can't figure. I know it will be a lot to read but I can't put this in less words... Sorry!
The problem is: I am using XAMPP; I created in Phpmyadmin a 'user' with less privileges than user "root" (only INSERT and UPDATE) and then I am connecting in php file with this new user to MySQL. After connecting and selecting a specific db ('test'), I am using a DELETE query just to see what it does, and it actually deletes the row from a table I specify even though I expected it won't be able to do this since the user I used to connect to the db has only insert and update privileges. What am I missing?
In phpmyadmin, in 'mysql' db - 'user' table, my low privileges 'user' appears and it has the exact privileges i granted it and they are global! Still, if I connect to another db with this 'user' and try to use delete query, it will say access denied. So it acts like an "admin" with only one DB ('test') but has limited privileges on all others.
Here's a screen shot from tab 'Users'. The limited user is at the bottom ('user') - http://gyazo.com/1ed0218982a4b80eb2927cee78e2a46c
Copyright License:
Author:「Irina」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/29050217/connecting-through-php-to-a-mysql-user-with-less-privileges