On Tue, Nov 19, 2013 at 5:26 PM, Himanshu Garg wrote:
> I did:
>
> import MySQLdb as mdb
> from MySQLdb import *
> from MySQLdb.constants import *
>
> and now it works. Thanks! again
Looks good! Glad it works.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
I did:
import MySQLdb as mdb
from MySQLdb import *
from MySQLdb.constants import *
and now it works. Thanks! again
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Nov 19, 2013 at 5:10 PM, Chris Angelico wrote:
> For a guess, I would try:
>
> import MySQLdb.connections
>
> above your chroot, and see if that helps.
And possibly also converters, cursors, release, times, and maybe
constants. I just peeked at the MySQLdb source code to see what's in
the
On Tue, Nov 19, 2013 at 5:03 PM, Himanshu Garg wrote:
> I have written the script as:
>
> import os
> import MySQLdb as mdb
>
> os.chroot("/lxc/rootfs")
> os.chdir("/")
> con = mdb.connect(host="192.168.1.7", user="root", passwd="password")
> print "opened"
> con.close()
>
> But when I execute, I
I have written the script as:
import os
import MySQLdb as mdb
os.chroot("/lxc/rootfs")
os.chdir("/")
con = mdb.connect(host="192.168.1.7", user="root", passwd="password")
print "opened"
con.close()
But when I execute, I get the following error:
"File "/usr/lib/python2.7/dist-packages/MySQLdb/__