Help Center/
GaussDB/
M-Compatibility Developer Guide(Centralized)/
Application Development Guide/
PyMySQL-based Development/
PyMySQL API Reference
Updated on 2025-10-23 GMT+08:00
PyMySQL API Reference
The PyMySQL library provides APIs for users. This section describes some common APIs.
- pymysql.connect()
- connection.cursor()
- cursor.execute(query, args)
- cursor.executemany(query,args)
- connection.begin()
- connection.commit()
- connection.rollback()
- cursor.fetchone()
- cursor.fetchall()
- cursor.fetchmany(size=None)
- cursor.close()
- connection.close()
- connection.ping(reconnect = True)
- connection.select_db(dbname)
- connection.set_character_set(charset, collation=None)
- connection.autocommit(arg)
Parent topic: PyMySQL-based Development
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot