==================== MySQLdb Installation ==================== .. contents:: .. Prerequisites ------------- + Python 2.3.4 or higher * http://www.python.org/ * Versions lower than 2.3 WON'T WORK. * 2.4 is the primary test environment. * Red Hat Linux: - Make sure you have the Python development headers and libraries (python-devel). + setuptools * http://pypi.python.org/pypi/setuptools + MySQL 3.23.32 or higher * http://www.mysql.com/downloads/ * Versions lower than 3.22 definitely WON'T WORK. * Versions lower than 3.22.19 might not work. * MySQL-3.22 might work but isn't supported anymore. It's very old. * MySQL-3.23 ought to work, but it's pretty elderly. * MySQL-4.0 is supported, but not tested and slightly discouraged. * MySQL-4.1 is supported. The prepared statements API is not supported, and won't be until MySQLdb-1.3 or 2.0, if ever. * MySQL-5.0 is supported and tested, including stored procedures. * MySQL-5.1 is supported (currently a release candidate) but untested. It should work. * MySQL-6.0 is sorta-kinda-supported (currently alpha) but untested. It should work. * Drizzle <https://launchpad.net/drizzle> is a fork of MySQL. So far the C API looks really similar except everything is renamed. Drizzle support probably won't happen in 1.2. There may be have to be an entirely different module, but still using DB-API. * MaxDB, formerly known as SAP DB (and maybe Adabas D?), is a completely different animal. Use the sapdb.sql module that comes with MaxDB. * Red Hat Linux packages: - mysql-devel to compile - mysql and/or mysql-devel to run * MySQL.com RPM packages: - MySQL-devel to compile - MySQL-shared if you want to use their shared library. Otherwise you'll get a statically-linked module, which may or may not be what you want. - MySQL-shared to run if you compiled with MySQL-shared installed * Transactions (particularly InnoDB tables) are supported for MySQL-3.23 and up. You may need a special package from your vendor with this support turned on. + zlib * Required for MySQL-3.23 and newer. * Red Hat Linux - zlib-devel to compile - zlib to run + openssl * May be needed for MySQL-4.0 or newer, depending on compilation options. If you need it, you probably already have it. - you may need openssl-devel on some platforms + C compiler * Most free software-based systems already have this, usually gcc. * Most commercial UNIX platforms also come with a C compiler, or you can also use gcc. * If you have some Windows flavor, you usually have to pay extra for this, or you can use Cygwin_. .. _Cygwin: http://www.cygwin.com/ Building and installing ----------------------- The setup.py script uses mysql_config to find all compiler and linker options, and should work as is on any POSIX-like platform, so long as mysql_config is in your path. Depending on which version of MySQL you have, you may have the option of using three different client libraries. To select the client library, edit the [options] section of site.cfg: embedded use embedded server library (libmysqld) if True; otherwise use one of the client libraries (default). threadsafe thread-safe client library (libmysqlclient_r) if True (default); otherwise use non-thread-safe (libmysqlclient). You should always use the thread-safe library if you have the option; otherwise you *may* have problems. static if True, try to link against a static library; otherwise link against dynamic libraries (default). You may need static linking to use the embedded server. Finally, putting it together:: $ tar xfz MySQL-python-1.2.1.tar.gz $ cd MySQL-python-1.2.1 $ # edit site.cfg if necessary $ python setup.py build $ sudo python setup.py install # or su first Windows ....... I don't do Windows. However if someone provides me with a package for Windows, I'll make it available. Don't ask me for help with Windows because I can't help you. Generally, though, running setup.py is similar to above:: C:\...> python setup.py install C:\...> python setup.py bdist_wininst The latter example should build a Windows installer package, if you have the correct tools. In any event, you *must* have a C compiler. Additionally, you have to set an environment variable (mysqlroot) which is the path to your MySQL installation. In theory, it would be possible to get this information out of the registry, but like I said, I don't do Windows, but I'll accept a patch that does this. On Windows, you will definitely have to edit site.cfg since there is no mysql_config in the MySQL package. Zope .... If you are using a binary package of Zope, you need run setup.py with the python executable that came with Zope. Otherwise, you'll install into the wrong Python tree and Zope (ZMySQLDA) will not be able to find _mysql. Binary Packages --------------- I don't plan to make binary packages any more. However, if someone contributes one, I will make it available. Several OS vendors have their own packages available. RPMs .... If you prefer to install RPMs, you can use the bdist_rpm command with setup.py. This only builds the RPM; it does not install it. You may want to use the --python=XXX option, where XXX is the name of the Python executable, i.e. python, python2, python2.4; the default is python. Using this will incorporate the Python executable name into the package name for the RPM so you have install the package multiple times if you need to support more than one version of Python. You can also set this in setup.cfg. Red Hat Linux ............. MySQL-python is pre-packaged in Red Hat Linux 7.x and newer. This includes Fedora Core and Red Hat Enterprise Linux. You can also build your own RPM packages as described above. Debian GNU/Linux ................ Packaged as `python-mysqldb`_:: # apt-get install python-mysqldb Or use Synaptic. .. _`python-mysqldb`: http://packages.debian.org/python-mysqldb Ubuntu ...... Same as with Debian. Gentoo Linux ............ Packaged as `mysql-python`_. :: # emerge sync # emerge mysql-python # emerge zmysqlda # if you use Zope .. _`mysql-python`: http://packages.gentoo.org/search/?sstring=mysql-python BSD ... MySQL-python is a ported package in FreeBSD, NetBSD, and OpenBSD, although the name may vary to match OS conventions. License ------- GPL or the original license based on Python 1.5.2's license. :Author: Andy Dustman <[email protected]> :Revision: $Id$
MySQLdb is a Python DB API-2.0 compliant library to interact with MySQL 3.23-5.1 (unofficial mirror)
Overview
Owner
Sébastien Arnaud
Dlsite-doujin-renamer - Dlsite doujin renamer tool with python
dlsite-doujin-renamer Features 支持深度查找带有 RJ 号的文件夹 支持手动选择文件夹或拖拽文件夹到软件窗口 支持在 config
A Telegram Bot to manage Redis Database.
A Telegram Bot to manage Redis database. Direct deploy on heroku Manual Deployment python3, git is required Clone repo git clone https://github.com/bu
aioodbc - is a library for accessing a ODBC databases from the asyncio
aioodbc aioodbc is a Python 3.5+ module that makes it possible to access ODBC databases with asyncio. It relies on the awesome pyodbc library and pres
Async ODM (Object Document Mapper) for MongoDB based on python type hints
ODMantic Documentation: https://art049.github.io/odmantic/ Asynchronous ODM(Object Document Mapper) for MongoDB based on standard python type hints. I
sync/async MongoDB ODM, yes.
μMongo: sync/async ODM μMongo is a Python MongoDB ODM. It inception comes from two needs: the lack of async ODM and the difficulty to do document (un)
Logica is a logic programming language that compiles to StandardSQL and runs on Google BigQuery.
Logica: language of Big Data Logica is an open source declarative logic programming language for data manipulation. Logica is a successor to Yedalog,
db.py is an easier way to interact with your databases
db.py What is it Databases Supported Features Quickstart - Installation - Demo How To Contributing TODO What is it? db.py is an easier way to interact
Asynchronous, fast, pythonic DynamoDB Client
AsyncIO DynamoDB Asynchronous pythonic DynamoDB client; 2x faster than aiobotocore/boto3/botocore. Quick start With httpx Install this library pip ins
Neo4j Bolt driver for Python
Neo4j Bolt Driver for Python This repository contains the official Neo4j driver for Python. Each driver release (from 4.0 upwards) is built specifical
This repository is for active development of the Azure SDK for Python.
Azure SDK for Python This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public
Pystackql - Python wrapper for StackQL
pystackql - Python Library for StackQL Python wrapper for StackQL Usage from pys
Asynchronous Python client for InfluxDB
aioinflux Asynchronous Python client for InfluxDB. Built on top of aiohttp and asyncio. Aioinflux is an alternative to the official InfluxDB Python cl
Python client for Apache Kafka
Kafka Python client Python client for the Apache Kafka distributed stream processing system. kafka-python is designed to function much like the offici
A simple python package that perform SQL Server Source Control and Auto Deployment.
deploydb Deploy your database objects automatically when the git branch is updated. Production-ready! ⚙️ Easy-to-use 🔨 Customizable 🔧 Installation I
Asynchronous interface for peewee ORM powered by asyncio
peewee-async Asynchronous interface for peewee ORM powered by asyncio. Important notes Since version 0.6.0a only peewee 3.5+ is supported If you still
Py2neo is a comprehensive toolkit for working with Neo4j from within Python applications or from the command line.
Py2neo Py2neo is a client library and toolkit for working with Neo4j from within Python applications and from the command line. The library supports b
The JavaScript Database, for Node.js, nw.js, electron and the browser
The JavaScript Database Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency. AP
A pythonic interface to Amazon's DynamoDB
PynamoDB A Pythonic interface for Amazon's DynamoDB. DynamoDB is a great NoSQL service provided by Amazon, but the API is verbose. PynamoDB presents y
A Redis client library for Twisted Python
txRedis Asynchronous Redis client for Twisted Python. Install Install via pip. Usage examples can be found in the examples/ directory of this reposito
Use SQL query in a jupyter notebook!
SQL-query Use SQL query in a jupyter notebook! The table I used can be found on UN Data. Or you can just click the link and download the file undata_s