
- Python & MySQL - Home
- Python & MySQL - Overview
- Python & MySQL - Environment Setup
- Python & MySQL Examples
- Python & MySQL - Connect Database
- Python & MySQL - Create Database
- Python & MySQL - Drop Database
- Python & MySQL - Select Database
- Python & MySQL - Create Tables
- Python & MySQL - Drop Tables
- Python & MySQL - Insert Records
- Python & MySQL - Select Records
- Python & MySQL - Update Records
- Python & MySQL - Delete Records
- Python & MySQL - Where Clause
- Python & MySQL - Like Clause
- Python & MySQL - Sorting Data
- Python & MySQL - Using Joins
- Python & MySQL - Performing Transactions
- Python & MySQL - Handling Errors
- Python & MySQL Useful Resources
- Python & MySQL - Quick Guide
- Python & MySQL - Useful Resources
- Python & MySQL - Discussion
Python & MySQL - Overview
The Python standard for database interfaces is the Python DB-API. Most Python database interfaces adhere to this standard.
You can choose the right database for your application. Python Database API supports a wide range of database servers such as −
- GadFly
- mSQL
- MySQL
- PostgreSQL
- Microsoft SQL Server 2000
- Informix
- Interbase
- Oracle
- Sybase
Here is the list of available Python database interfaces: Python Database Interfaces and APIs. You must download a separate DB API module for each database you need to access. For example, if you need to access an Oracle database as well as a MySQL database, you must download both the Oracle and the MySQL database modules.
The DB API provides a minimal standard for working with databases using Python structures and syntax wherever possible. This API includes the following −
- Importing the API module.
- Acquiring a connection with the database.
- Issuing SQL statements and stored procedures.
- Closing the connection
MySQLdb
MySQLdb is an interface for connecting to a MySQL database server from Python. It implements the Python Database API v2.0 and is built on top of the MySQL C API.