mysql_change_user

bool mysql_change_user(string user, string password, [string database], 
 [mysql link connection]) 
user Username to log in with
password Password to use
database Default database to use for queries
connection Connection handle returned by mysql_connect() or mysql_pconnect()

Changes the user for an active MySQL connection.

Returns:

TRUE on success; FALSE otherwise

Description:

mysql_change_user() allows the user for any active MySQL connection to be changed as desired.

The user and password arguments are required. The optional database argument is used to set the default database to use with calls to mysql_query() for the MySQL connection given in connection . If no connection handle is specified in the connection argument, ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.