Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_change_user() Function

PHP mysqli_change_user() Function

PHP MySQLi Reference Manual PHP MySQLi Reference Manual

Example

Change the user of the specified database connection:


Definition and Usage

The mysqli_change_user() function changes the user of the specified database connection and sets the current database.


Syntax

mysqli_change_user(

connection,username,password,dbname);

Parameters Description
connection Required. Specifies the MySQL connection to use.
username Required. Specifies the MySQL username.
password Required. Specifies the MySQL password.
dbname Required. Specifies the new database to change to.

Technical Details

Return Value: Returns TRUE on success, FALSE on failure.
PHP Version: 5+

PHP MySQLi Reference Manual PHP MySQLi Reference Manual