Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Post by dave » Fri, 19 Nov 2010 09:02:05


http://www.yqcomputer.com/

Using this package, WITHOUT having MySQL installed on my Mac OS X, how
can I use python to connect to a remote MySQL server?

All of the tutorials mention having to download MySQL!
 
 
 

Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Post by Tim Hari » Fri, 19 Nov 2010 09:21:54


You don't have to install all of MySQL, just the client libraries. I would
assume that almost every MySQL connector uses these libraries; but, you
might see if the MySQL-ODBC connector will work without them. It is a long
shot. Your last option would be to recreate your own connector without
using the MySQL client libraries. I am not really sure what the purpose of
reinventing this wheel would be.

 
 
 

Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Post by Steve Hold » Fri, 19 Nov 2010 11:24:22


I believe that the coming trend is to implement the MySQL client
protocol directly in Python, thereby obviating the need for any MySQL
client installation on the machine hosting the Python code.

The pymysql project at http://www.yqcomputer.com/
solution, aimed at satisfying Python 3 users without the need to port
existing low-level client code.

As an irrelevance might I also add that the trend for built-in extension
modules is to require a reference implementation in Python to ease the
task of those wishing to port the language and get as much functionality
(albeit at some performance in cost) available as early in the porting
cycle as possible.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://www.yqcomputer.com/
See Python Video! http://www.yqcomputer.com/
Holden Web LLC http://www.yqcomputer.com/
 
 
 

Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Post by Tim Hari » Fri, 19 Nov 2010 12:19:16


One of the advantages to using the MySQL supplied library is that if the
line protocol changes the connector automatically inherits the work already
done by MySQL for the price of a stable API (yes, I am aware that the MySQL
API *has* changed through the years). That could be very relevant in the
near future as the probject settles its stable forks.


That still looks like alpha code. Would you be willing to make a statement
as to its stability?
 
 
 

Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

Post by Steve Hold » Fri, 19 Nov 2010 13:19:49


No, that was purely an example. I am, however, using MySQL Connector/Python

https://launchpad.net/myconnpy

in a series of commercial Python 3 classes.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://www.yqcomputer.com/
See Python Video! http://www.yqcomputer.com/
Holden Web LLC http://www.yqcomputer.com/