MySQL Forums
Forum List  »  Connector/Python

Help with getting Python Connector working
Posted by: Rich Gosselin
Date: November 21, 2014 11:17AM

After trying many things I continue to get errors using the Python Connector.

MySQL works fine in my installation & has for a few years. Python as well. The Path & other system variables seem to be ok. I've put all these below and would like some assitance in getting this to work. Since I work alone, there is no other person locally to seek help from in MySQL or Python individually.

Path is:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;G:\MySQL\MySQL Utilities 1.3.6\;C:\Python34\;C:\MysqlConnector\

OS is:
Win Server 2012 R2 Essentials

Where & which file used to install:
MySQL installation: G:\MySQL\MySQL Server 5.6
Python: C:\Python34
Connector: C:\MysqlConnector

File versions:

Proper Python installation:
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.sysconfig import get_python_lib
>>> print(get_python_lib())

Simple connect & error:
# -*- coding: utf-8 -*-
# MySQL Workbench Python script
# <description>
# Written in MySQL Workbench 6.1.6

import mysql.connector

cnx = mysql.connector.connect(user='root', password='**********', database='aes')

# do things


Uncaught exception while executing C:\Python34\Scripts\
File "c:\python34\scripts\", line 8, in <module>
import mysql.connector
ImportError: No module named mysql.connector

Would appreciate any help,


Options: ReplyQuote

Written By
Help with getting Python Connector working
November 21, 2014 11:17AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.