mysql_change_user - Online Linux Manual PageSection : 3
Updated :
Source : Version 3.2.2
Note : MariaDB Connector/C

Namemysql_change_user − changes user and default database

Synopsis #include <mysql.h> my_bool mysql_change_user(MYSQL * mysql, const char * user, const char * passwd, const char * db);

DescriptionChanges the user and default database of the current connection. 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.

Parameters• mysql is a connection identifier, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). • user − the user name for server authentication • passwd − the password for server authentication • db − the default database. If desired, the NULL value may be passed resulting in only changing the user and not selecting a database. To select a database in this case use the mysql_select_db(3) function.

Notes• mysql_change_user will always cause the current database connection to behave as if was a completely new database connection, regardless of if the operation was completed successfully. This reset includes performing a rollback on any active transactions, closing all temporary tables, and unlocking all locked tables. • To prevent denial of service and brute−force attacks the server will block the connection if mysql_change_user() failed three times in a row

Return valueReturns zero on success, nonzero if an error occurred.

See also• mysql_real_connect(3) • mysql_select_db(3)
0
Johanes Gumabo
Data Size   :   7,159 byte
man-mysql_change_user.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 237,705
Visitor ID   :     :  
Visitor IP   :   18.226.28.97   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.