MySQL Forums
Forum List  »  PHP

mysqli_real_query("CREATE USER") succeeds but does nothing
Posted by: Walter Oney
Date: December 05, 2019 09:13AM

I need to be able to create new users from a PHP script (in order to restrict access to specific tables that I create from the PHP script as part of administrative control panel function). Calling mysqli_real_query with a command of the form "CREATE USER 'username' IDENTIFIED BY 'password'" doesn't produce any error, but it doesn't work either -- the user isn't created, as verified by inspecting the MySQL.user table before and after. [And, yes, my actual code guards against injection attacks. I'm simplifying for the sake of clarity. And, yes, I've connected to the server as a user who has CREATE USER permission.]

Options: ReplyQuote


Subject
Written By
Posted
mysqli_real_query("CREATE USER") succeeds but does nothing
December 05, 2019 09:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.