Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb


10.2.44 MySQLConnection.database Property

This property sets the current (default) database by executing aUSE statement. The property can also be used to retrieve the current database name.

>>> cnx.database = 'test'>>> cnx.database = 'mysql'>>> cnx.databaseu'mysql'

Returns a string.