问题
I wish to grant permissions to various users for my databases using a .php script
But it seems that GRANT command is denied when accessed via PHPMYADMIN or a .php file
Is there a way out to achive this?
回答1:
You have to have some kind of rights to do that, This is how you can check them:
show grants for 'youruser'@'localhost';
If you cannot find anything like WITH GRANT OPTION
it is very likely that you cannot do that. It's not a limitation of PHP.
More on the GRANT
command: http://dev.mysql.com/doc/refman/5.1/en/grant.html
来源:https://stackoverflow.com/questions/8911916/remote-mysql-ip-access