添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
本手册介绍了如何安装和配置 MySQL Connector/Python,这是一个用于与 MySQL 服务器通信的独立 Python 驱动程序,以及如何使用它来开发数据库应用程序。 强烈建议将 MySQL Connector/Python 8.0 与 MySQL Server 8.0、5.7 和 5.6 一起使用。请升级到 MySQL Connector/Python 8.0。 有关详细说明每个版本的连接器/Python 中更改的注释,请参阅 MySQL 连接器/Python 版本说明 。 有关法律信息,请参阅 法律声明 。 如需有关使用 MySQL 的帮助,请访问 MySQL 论坛 ,您可以在其中与其他 MySQL 用户讨论您的问题。

许可信息。 本产品可能包含第三方软件,在许可下使用。 MySQL Connector/Python 2.2 Community License Information User Manual 包含有关 MySQL Connector/Python 社区版本 2.2 及以下版本的许可信息。 MySQL Connector/Python 2.2 商业许可信息用户手册 包含有关 MySQL Connector/Python 商业版本 2.2 及以下版本的许可信息。 MySQL Connector/Python 8.0 Community License Information 用户手册 有关于 8.0 版本系列中与 MySQL 连接器/Python 社区版本相关的许可证的信息。 MySQL Connector/Python 8.0 Commercial License Information User Manual 包含与 8.0 版本系列中的 MySQL Connector/Python 商业版本相关的许可证信息。 文档生成于:2022-11-17(修订:74551)

10.1.1 mysql.connector.connect()方法
10.1.2 mysql.connector.apilevel 属性
10.1.3 mysql.connector.paramstyle 属性
10.1.4 mysql.connector.threadsafety 属性
10.1.5 mysql.connector.__version__ 属性
10.1.6 mysql.connector.__version_info__ 属性
10.2 connection.MySQLConnection类
10.2.1 connection.MySQLConnection()构造函数
10.2.2 MySQLConnection.close()方法
10.2.3 MySQLConnection.commit()方法
10.2.4 MySQLConnection.config()方法
10.2.5 MySQLConnection.connect()方法
10.2.6 MySQLConnection.cursor()方法
10.2.7 MySQLConnection.cmd_change_user()方法
10.2.8 MySQLConnection.cmd_debug()方法
10.2.9 MySQLConnection.cmd_init_db()方法
10.2.10 MySQLConnection.cmd_ping()方法
10.2.11 MySQLConnection.cmd_process_info()方法
10.2.12 MySQLConnection.cmd_process_kill()方法
10.2.13 MySQLConnection.cmd_query()方法
10.2.14 MySQLConnection.cmd_query_iter()方法
10.2.15 MySQLConnection.cmd_quit()方法
10.2.16 MySQLConnection.cmd_refresh()方法
10.2.17 MySQLConnection.cmd_reset_connection()方法
10.2.18 MySQLConnection.cmd_shutdown()方法
10.2.19 MySQLConnection.cmd_statistics()方法
10.2.20 MySQLConnection.disconnect()方法
10.2.21 MySQLConnection.get_row()方法
10.2.22 MySQLConnection.get_rows()方法
10.2.23 MySQLConnection.get_server_info()方法
10.2.24 MySQLConnection.get_server_version()方法
10.2.25 MySQLConnection.is_connected()方法
10.2.26 MySQLConnection.isset_client_flag()方法
10.2.27 MySQLConnection.ping()方法
10.2.28 MySQLConnection.reconnect()方法
10.2.29 MySQLConnection.reset_session()方法
10.2.30 MySQLConnection.rollback()方法
10.2.31 MySQLConnection.set_charset_collat​​ion()方法
10.2.32 MySQLConnection.set_client_flags()方法
10.2.33 MySQLConnection.shutdown()方法
10.2.34 MySQLConnection.start_transaction()方法
10.2.35 MySQLConnection.autocommit 属性
10.2.36 MySQLConnection.unread_results 属性
10.2.37 MySQLConnection.can_consume_results 属性
10.2.38 MySQLConnection.charset 属性
10.2.39 MySQLConnection.collat​​ion 属性
10.2.40 MySQLConnection.connection_id 属性
10.2.41 MySQLConnection.database 属性
10.2.42 MySQLConnection.get_warnings 属性
10.2.43 MySQLConnection.in_transaction 属性
10.2.44 MySQLConnection.raise_on_warnings 属性
10.2.45 MySQLConnection.server_host 属性
10.2.46 MySQLConnection.server_port 属性
10.2.47 MySQLConnection.sql_mode 属性
10.2.48 MySQLConnection.time_zone 属性
10.2.49 MySQLConnection.unix_socket 属性
10.2.50 MySQLConnection.user 属性
10.3 pooling.MySQLConnectionPool类
10.3.1 pooling.MySQLConnectionPool构造函数
10.3.2 MySQLConnectionPool.add_connection()方法
10.3.3 MySQLConnectionPool.get_connection()方法
10.3.4 MySQLConnectionPool.set_config()方法
10.3.5 MySQLConnectionPool.pool_name 属性
10.4 pooling.PooledMySQLConnection类
10.4.1 pooling.PooledMySQLConnection构造函数
10.4.2 PooledMySQLConnection.close()方法
10.4.3 PooledMySQLConnection.config()方法
10.4.4 PooledMySQLConnection.pool_name 属性
10.5 游标.MySQL游标类
10.5.1 cursor.MySQLCursor构造函数
10.5.2 MySQLCursor.callproc()方法
10.5.3 MySQLCursor.close()方法
10.5.4 MySQLCursor.execute()方法
10.5.5 MySQLCursor.executemany()方法
10.5.6 MySQLCursor.fetchall()方法
10.5.7 MySQLCursor.fetchmany()方法
10.5.8 MySQLCursor.fetchone()方法
10.5.9 MySQLCursor.fetchwarnings()方法
10.5.10 MySQLCursor.stored_results()方法
10.5.11 MySQLCursor.column_names 属性
10.5.12 MySQLCursor.description 属性
10.5.13 MySQLCursor.lastrowid 属性
10.5.14 MySQLCursor.rowcount 属性
10.5.15 MySQLCursor.statement 属性
10.5.16 MySQLCursor.with_rows 属性
10.6 cursor.MySQLCursor 的子类
10.6.1 cursor.MySQLCursorBuffered 类
10.6.2 cursor.MySQLCursorRaw类
10.6.3 cursor.MySQLCursorBufferedRaw 类
10.6.4 cursor.MySQLCursorDict类
10.6.5 cursor.MySQLCursorBufferedDict类
10.6.6 cursor.MySQLCursorNamedTuple 类
10.6.7 cursor.MySQLCursorBufferedNamedTuple 类
10.6.8 cursor.MySQLCursorPrepared类
10.7 constants.ClientFlag类
10.8 constants.FieldType类
10.9 constants.SQLMode类
10.10 constants.CharacterSet类
10.11 constants.RefreshOption类
10.12 错误和异常
10.12.1 错误代码模块
10.12.2 errors.Error异常
10.12.3 errors.DataError异常
10.12.4 errors.DatabaseError异常
10.12.5 errors.IntegrityError异常
10.12.6 errors.InterfaceError异常
10.12.7 errors.InternalError异常
10.12.8 errors.NotSupportedError 异常
10.12.9 errors.OperationalError异常
10.12.10 errors.PoolError 异常
10.12.11 errors.ProgrammingError 异常
10.12.12 错误。警告异常
10.12.13 errors.custom_error_exception()函数
11 连接器/Python C 扩展 API 参考
11.1 _mysql_connector 模块
11.2 _mysql_connector.MySQL()类
11.3 _mysql_connector.MySQL.affected_rows()方法
11.4 _mysql_connector.MySQL.autocommit()方法
11.5 _mysql_connector.MySQL.buffered()方法
11.6 _mysql_connector.MySQL.change_user()方法
11.7 _mysql_connector.MySQL.character_set_name()方法
11.8 _mysql_connector.MySQL.close()方法
11.9 _mysql_connector.MySQL.commit()方法
11.10 _mysql_connector.MySQL.connect()方法
11.11 _mysql_connector.MySQL.connected()方法
11.12 _mysql_connector.MySQL.consume_result()方法
11.13 _mysql_connector.MySQL.convert_to_mysql()方法
11.14 _mysql_connector.MySQL.escape_string()方法
11.15 _mysql_connector.MySQL.fetch_fields()方法
11.16 _mysql_connector.MySQL.fetch_row()方法
11.17 _mysql_connector.MySQL.field_count()方法
11.18 _mysql_connector.MySQL.free_result()方法
11.19 _mysql_connector.MySQL.get_character_set_info()方法
11.20 _mysql_connector.MySQL.get_client_info()方法
11.21 _mysql_connector.MySQL.get_client_version()方法
11.22 _mysql_connector.MySQL.get_host_info()方法
11.23 _mysql_connector.MySQL.get_proto_info()方法
11.24 _mysql_connector.MySQL.get_server_info()方法
11.25 _mysql_connector.MySQL.get_server_version()方法
11.26 _mysql_connector.MySQL.get_ssl_cipher()方法
11.27 _mysql_connector.MySQL.hex_string()方法
11.28 _mysql_connector.MySQL.insert_id()方法
11.29 _mysql_connector.MySQL.more_results()方法
11.30 _mysql_connector.MySQL.next_result()方法
11.31 _mysql_connector.MySQL.num_fields()方法
11.32 _mysql_connector.MySQL.num_rows()方法
11.33 _mysql_connector.MySQL.ping()方法
11.34 _mysql_connector.MySQL.query()方法
11.35 _mysql_connector.MySQL.raw()方法
11.36 _mysql_connector.MySQL.refresh()方法
11.37 _mysql_connector.MySQL.reset_connection()方法
11.38 _mysql_connector.MySQL.rollback()方法
11.39 _mysql_connector.MySQL.select_db()方法
11.40 _mysql_connector.MySQL.set_character_set()方法
11.41 _mysql_connector.MySQL.shutdown()方法
11.42 _mysql_connector.MySQL.stat()方法
11.43 _mysql_connector.MySQL.thread_id()方法
11.44 _mysql_connector.MySQL.use_unicode()方法
11.45 _mysql_connector.MySQL.warning_count()方法
11.46 _mysql_connector.MySQL.have_result_set 属性