My favorite Python connected for MySQL or MariaDB is MySQLdb, the problem with this connector is that it is complicated to install on Windows!
I am creating this article for those who want to install MySQLdb for Python 3 for Windows. Especially me, since each time I am doing a Python project that needs to connect to MariaDB or MySQL I always look on how to install MySQLdb.
- Problems with installing MySQLdb on Windows
- Properly Installing MySQLdb on Windows
- Testing MySQLdb Installation
If you are interested why I prefer MySQLdb compared to other MySQL connectors you may want to read the comparison of MySQL-connector and MySQLdb from Charles Nagy.
You can actually install MySQLdb using pip. See pypi documentation here.
pip install MySQL-python
Unfortunately, the pypi documentation is already out of date with the latest release was on Jan 3, 2014. Continue reading Installing MySQLdb for Python 3 in Windows