- Saved searches
- Use saved searches to filter your results more quickly
- License
- conda-forge/mysql-connector-python-feedstock
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Saved searches
- Use saved searches to filter your results more quickly
- License
- PyMySQL/mysqlclient
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Saved searches
- Use saved searches to filter your results more quickly
- License
- ep-infosec/32_mysql_mysql-connector-python
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.rst
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
A conda-smithy repository for mysql-connector-python.
License
conda-forge/mysql-connector-python-feedstock
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Package license: GPL-2.0-or-later WITH Universal-FOSS-exception-1.0
Summary: Python driver for communicating with MySQL servers
MySQL Connector/Python is a standardized database driver for Python platforms and development.
Installing mysql-connector-python from the conda-forge channel can be achieved by adding conda-forge to your channels with:
conda config --add channels conda-forge conda config --set channel_priority strict
Once the conda-forge channel has been enabled, mysql-connector-python can be installed with conda :
conda install mysql-connector-python
mamba install mysql-connector-python
It is possible to list all of the versions of mysql-connector-python available on your platform with conda :
conda search mysql-connector-python --channel conda-forge
mamba search mysql-connector-python --channel conda-forge
Alternatively, mamba repoquery may provide more information:
# Search all versions available on your platform: mamba repoquery search mysql-connector-python --channel conda-forge # List packages depending on `mysql-connector-python`: mamba repoquery whoneeds mysql-connector-python --channel conda-forge # List dependencies of `mysql-connector-python`: mamba repoquery depends mysql-connector-python --channel conda-forge
conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.
A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge Anaconda-Cloud channel for Linux, Windows and OSX respectively.
To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock’s supporting files (e.g. the CI configuration files) with conda smithy rerender .
For more information please check the conda-forge documentation.
feedstock — the conda recipe (raw material), supporting scripts and CI configuration.
conda-smithy — the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.
conda-forge — the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)
If you would like to improve the mysql-connector-python recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/mysql-connector-python-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.
In order to produce a uniquely identifiable distribution:
- If the version of a package is not being increased, please add or increase the build/number .
- If the version of a package is being increased, please remember to return the build/number back to 0.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
MySQL database connector for Python (with Python 3 support)
License
PyMySQL/mysqlclient
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This project is a fork of MySQLdb1. This project adds Python 3 support and fixed many bugs.
Do Not use Github Issue Tracker to ask help. OSS Maintainer is not free tech support
When your question looks relating to Python rather than MySQL:
Or when you have question about MySQL:
Building mysqlclient on Windows is very hard. But there are some binary wheels you can install easily.
If binary wheels do not exist for your version of Python, it may be possible to build from source, but if this does not work, do not come asking for support. To build from source, download the MariaDB C Connector and install it. It must be installed in the default location (usually «C:\Program Files\MariaDB\MariaDB Connector C» or «C:\Program Files (x86)\MariaDB\MariaDB Connector C» for 32-bit). If you build the connector yourself or install it in a different location, set the environment variable MYSQLCLIENT_CONNECTOR before installing. Once you have the connector installed and an appropriate version of Visual Studio for your version of Python:
Install MySQL and mysqlclient:
# Assume you are activating Python 3 venv $ brew install mysql pkg-config $ pip install mysqlclient
If you don’t want to install MySQL server, you can use mysql-client instead:
# Assume you are activating Python 3 venv $ brew install mysql-client pkg-config $ export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig" $ pip install mysqlclient
Note that this is a basic step. I can not support complete step for build for all environment. If you can see some error, you should fix it by yourself, or ask for support in some user forum. Don’t file a issue on the issue tracker.
You may need to install the Python 3 and MySQL development headers and libraries like so:
- $ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config # Debian / Ubuntu
- % sudo yum install python3-devel mysql-devel pkgconfig # Red Hat / CentOS
Then you can install mysqlclient via pip now:
mysqlclient uses pkg-config —cflags —ldflags mysqlclient by default for finding compiler/linker flags.
You can use MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS environment variables to customize compiler/linker options.
$ export MYSQLCLIENT_CFLAGS=`pkg-config mysqlclient --cflags` $ export MYSQLCLIENT_LDFLAGS=`pkg-config mysqlclient --libs` $ pip install mysqlclient
Documentation is hosted on Read The Docs
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
License
ep-infosec/32_mysql_mysql-connector-python
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.rst
MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249). It also contains an implementation of the X DevAPI, an Application Programming Interface for working with the MySQL Document Store.
The recommended way to install Connector/Python is via pip.
Make sure you have a recent pip version installed on your system. If your system already has pip installed, you might need to update it. Or you can use the standalone pip installer.
shell> pip install mysql-connector-python
Please refer to the installation tutorial for installation alternatives.
Using the MySQL classic protocol:
import mysql.connector # Connect to server cnx = mysql.connector.connect( host="127.0.0.1", port=3306, user="mike", password="s3cre3t!") # Get a cursor cur = cnx.cursor() # Execute a query cur.execute("SELECT CURDATE()") # Fetch one result row = cur.fetchone() print("Current date is: ".format(row[0])) # Close connection cnx.close()
import mysqlx # Connect to server session = mysqlx.get_session( host="127.0.0.1", port=33060, user="mike", password="s3cr3t!") schema = session.get_schema("test") # Use the collection "my_collection" collection = schema.get_collection("my_collection") # Specify which document to find with Collection.find() result = collection.find("name like :param") \ .bind("param", "S%") \ .limit(1) \ .execute() # Print document docs = result.fetch_all() print(r"Name: ".format(docs[0]["name"])) # Close session session.close()
- MySQL Connector/Python Developer Guide
- MySQL Connector/Python X DevAPI Reference
- MySQL Connector/Python Forum
- MySQL Public Bug Tracker
- Slack (Sign-up required if you do not have an Oracle account)
- Stack Overflow
- InsideMySQL.com Connectors Blog
There are a few ways to contribute to the Connector/Python code. Please refer to the contributing guidelines for additional information.
Please refer to the README.txt and LICENSE.txt files, available in this repository, for further details.