Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31455
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'host,': 0.07; 'mysql,': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'looked': 0.10; 'portion': 0.13; 'backend.': 0.16; 'localhost': 0.16; 'oct': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'source"': 0.16; 'subject:sample': 0.16; 'using,': 0.16; 'url:dev': 0.17; '(in': 0.18; 'define': 0.20; 'defined': 0.22; 'installed': 0.23; '(this': 0.24; 'host': 0.24; 'url:wiki': 0.26; 'connects': 0.27; 'subject:please': 0.27; 'header:X-Complaints-To:1': 0.28; 'case,': 0.29; 'url:code': 0.29; 'source': 0.29; 'normally': 0.30; 'code': 0.31; 'etc.)': 0.32; "aren't": 0.33; 'url:home': 0.33; 'to:addr :python-list': 0.33; 'server': 0.35; 'list': 0.35; 'continue': 0.35; 'received:org': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'skip:p 20': 0.36; 'uses': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'url:en': 0.38; 'system.': 0.39; 'to:addr:python.org': 0.39; 'application': 0.40; 'header:Received:5': 0.40; 'url:5': 0.61; 'url:p': 0.63; 'information': 0.63; 'subject: ': 0.66; 'drivers': 0.71; 'click': 0.76; 'shopping': 0.87; 'dennis': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: how to use pyODBC to connect to MySql ,please give me a sample |
| Date | Tue, 16 Oct 2012 23:18:11 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <e89cd234-15ac-42c5-86d0-5be2e86b6a6d@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-76-253-111-158.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2313.1350443902.27098.python-list@python.org> (permalink) |
| Lines | 38 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1350443902 news.xs4all.nl 6840 [2001:888:2000:d::a6]:40561 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:31455 |
Show key headers only | View raw
On Tue, 16 Oct 2012 18:36:13 -0700 (PDT), iMath <redstone-cold@163.com>
declaimed the following in gmane.comp.python.general:
>
> host name : localhost
> user name:root
> password:19910512
> database name : shopping
Have you looked at
http://code.google.com/p/pyodbc/wiki/GettingStarted
ODBC is an intermediary system... That is, the application (in this
case, the code using pyODBC) connects to a defined "data source" managed
by the OS-common ODBC system. The OS-common portion uses information in
the data source to connect to the database-specific ODBC backend.
In the case of MySQL, that means you need to have
http://dev.mysql.com/downloads/connector/odbc/ installed also, and then
define the datasource
http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-examples-walkthrough.html
(this means using, if you are on Windows, using Control
Panel/Administrative Tools/Data Sources(ODBC) to create either a User
DSN or a System DSN. When you click "Add", you will be given a list of
ODBC drivers -- pick the MySQL ODBC driver... Then continue with
configuring the host, database name, etc.)
{If you aren't on Windows, you should normally be able to bypass the
MySQL ODBC connector and go directly to the server using UNIX pipes, or
some such -- read the Connector documentation or MySQL documentation for
details}
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
how to use pyODBC to connect to MySql ,please give me a sample iMath <redstone-cold@163.com> - 2012-10-16 18:36 -0700 Re: how to use pyODBC to connect to MySql ,please give me a sample Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-16 23:18 -0400
csiph-web