# How To Set Up Maya 8.5 And Python Mysqldb

**URL:** https://forum.highend3d.com/t/how-to-set-up-maya-8-5-and-python-mysqldb/48930
**Category:** Maya
**Tags:** python
**Created:** [December 4, 2007, 6:31pm UTC](https://forum.highend3d.com/t/how-to-set-up-maya-8-5-and-python-mysqldb/48930 "2007-12-04T18:31:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alexkew](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@alexkew](https://forum.highend3d.com/u/alexkew)
#### Post date: [December 4, 2007, 6:31pm UTC](https://forum.highend3d.com/t/how-to-set-up-maya-8-5-and-python-mysqldb/48930/1 "2007-12-04T18:31:10Z")

</div>

I saw a post about this previously… I got MySQL connectivity working in Maya 8.5 with python on Win32.

Here’s how I did it:

1. found out that Maya 8.5 uses the python 2.4 interpreter
2. downloaded the MySQLdb connector from SourceForge: [http://sourceforge.net/project/showfiles.php?group\_id=22307](http://sourceforge.net/project/showfiles.php?group_id=22307)  
(make sure you grab the Python 2.4 build, “MySQL-python-1.2.2.win32-py2.4.exe”)
3. The file you download is a self-extracting archive. I used WinRar to uncompress it to a temporary location
4. Copy the uncompressed files to the “\Maya8.5\Python\lib\site-packages” directory
5. Start Maya and run some test code via Python:

dbh = MySQLdb.connect(host = “localhost”, user = “root”, passwd = “thePassword”, db = “someDatabase”)  
sth = dbh.cursor()  
sth.execute (“SELECT NOW()”)  
row = sth.fetchone()  
print "it is ", row[0]  
sth.close()  
dbh.close()

For Maya on Win64, you’ll probably have to find a build of MySQLdb for Win64, or compile it yourself. Use gcc on  
Cygwin (for example)

…xelA

---

<div class="post-metadata">

### Author: ![chapmanms](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chapmanms](https://forum.highend3d.com/u/chapmanms)
#### Post date: [December 7, 2007, 7:15pm UTC](https://forum.highend3d.com/t/how-to-set-up-maya-8-5-and-python-mysqldb/48930/2 "2007-12-07T19:15:05Z")

</div>

Indeed I have also setup PostgreSQL & MSSql connections from maya. A very sweet python wrapper for sql is [http://www.sqlalchemy.org/](http://www.sqlalchemy.org/) Check it out.  
Python defiantly makes project management possible inside of maya.
