python3连接mysql

来源:互联网 发布:逻辑回归算法详解 编辑:程序博客网 时间:2024/05/23 15:54

解决方案:https://stackoverflow.com/questions/35684400/how-to-use-python-3-5-1-with-a-mysql-database

  1. I am using Python 3.5.2 on window 8 pro 64-bit and the following procedure is worked for me.Download driver (PyMySQL-0.7.9.tar.gz (md5)) from https://pypi.python.org/pypi/PyMySQL
  2. Extract and copy the folder pymysql(这个内部文件夹) into the python Lib folder e.g (C:\Users\MyUsername\AppData\Local\Programs\Python\Python35-32\Lib)
  3. Copy and run the following example.py