Accessing MySQL *without* using MySQLdb
wilk-spamout at flibuste.net
Tue Oct 1 11:19:31 CEST 2002
Skip Montanaro <skip at pobox.com> writes:
> Luis> I'm writing a few Python scripts for CGI. My hosting company sort
> Luis> of supports Python (it has Python 1.5.2 running in the server -
> Luis> Red Hat Linux + Apache) and MySQL. However, they are not very keen
> Luis> in installing new modules (e.g. MySQLdb). How can I access a MySQL
> Luis> database from Python, without installing new modules? Does anyone
> Luis> have a few pieces of code that would achieve this?
> The MySQL access in MySQLdb is actually done by the extension module _mysql,
> which calls the client library provided by the MySQL folks.
> Can't you install MySQLdb in your own directory tree, then add that to
> sys.path at the top of your CGI script? You should be able to install it
> using something like
> python setup.py --prefix=/home/luis/local
It's also possible to install it on it's own linux and copy the
directory of mysqldb, _mysql.so and _mysql_exceptions.py
I did it on a webhosting where is only python1.5 (redhat server :((()
and not ssh
If you want a copy of theses binary, contact me.
William Dodé - flibuste.net
More information about the Python-list