change_user()
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Connector/Python API
Topics on this page:
Overview
Changes the user and default database of the current connection. A valid username and password pair 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.
See also: MariaDB Connector/Python 1.1 and in 1.0
EXAMPLES
import mariadb
conn = mariadb.connect(
host = 'localhost',
user = 'root',
password = 'secret',
)
conn.change_user('joe', 'secret2', 'test_table')
CHANGE HISTORY
Release Series | History |
---|---|
1.1 |
|
1.0 |
|