Newbie: Using MySQL
Gillou
nospam at bigfoot.com
Mon Nov 12 18:06:16 EST 2001
"Jordan Elver" <jord.elver at virgin.net> a écrit dans le message news:
mailman.1005440233.15939.python-list at python.org...
> Hi, First post to the list :-)
Welcome...
> Could someone point me in the right direction for MySQL using Python
> ...
> db = MySQLdb.Connect(host=db_host, user=db_user, passwd=db_passwd,
db=db_db)
>
> Thanks for any help.
>
Your connection object constructor sounds good.
What's the error message ?
Did you try this from a shell on your console:
$ mysql -h db_host -u db_user -p db_passwd db_db
Then play with any "mysql> select ..."
If any problem, ask your mysql admin to add:
mysql> grant all on db_db.* to db_user%your_client_hostname_or_IP identified
by "db_passwd";
And retry your script
HTH
--Gillou
> Jord
> --
> Jordan Elver
> http://www.jordanelver.co.uk
> "Only wimps use tape backup: _real_ men just upload their important stuff
on
> ftp, and let the rest of the world mirror it ;)" --- Linus Torvalds
>
More information about the Python-list
mailing list