Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Classe « connection »

Méthode MySQLdb.connection.change_user

Signature de la méthode change_user

Description

change_user.__doc__

Changes the user and causes the database specified by db to
become the default (current) database on the connection
specified by mysql. In subsequent queries, this database is
the default for table references that do not include an
explicit database specifier.

This function was introduced in MySQL Version 3.23.3.

Fails unless the connected user can be authenticated or if he
doesn't have permission to use the database. In this case the
user and database are not changed.

The db parameter may be set to None if you don't want to have
a default database.