bool mysqli::change_user ( string $user , string $password , string $database )
bool mysqli_change_user ( mysqli $link , string $user , string $password , string $database )
Changes the user of the specified database connection and sets the current database.In order to successfully change users a valid username and password parameters must be provided and that user must have sufficient permissions to access the desired database. If for any reason authorization fails, the current user authentication will remain.
The mysqli_change_user() function changes the user of the specified database connection, and sets the current database.
Parameter | Description |
---|---|
link | Procedural style only: A link identifier returned by mysqli_connect() or mysqli_init() |
user | The MySQL user name. |
password | The MySQL password. |
database | The database to change to. |
Returns TRUE on success or FALSE on failure.