Using Python and Connecting to MySQL remotely WITHOUT MySQL installedon local computer

Discussion in 'Python' started by dave, Nov 18, 2010.

  1. dave

    dave Guest

    http://sourceforge.net/projects/mysql-python/

    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!
    dave, Nov 18, 2010
    #1
    1. Advertising

  2. dave

    Tim Harig Guest

    Re: Using Python and Connecting to MySQL remotely WITHOUT MySQLinstalled on local computer

    On 2010-11-18, dave <> wrote:
    > http://sourceforge.net/projects/mysql-python/
    >
    > 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!


    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.
    Tim Harig, Nov 18, 2010
    #2
    1. Advertising

  3. dave

    Steve Holden Guest

    Re: Using Python and Connecting to MySQL remotely WITHOUT MySQLinstalled on local computer

    On 11/17/2010 7:21 PM, Tim Harig wrote:
    > On 2010-11-18, dave <> wrote:
    >> http://sourceforge.net/projects/mysql-python/
    >>
    >> 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!

    >
    > 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.


    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://code.google.com/p/pymysql/ is one such
    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://us.pycon.org/
    See Python Video! http://python.mirocommunity.org/
    Holden Web LLC http://www.holdenweb.com/
    Steve Holden, Nov 18, 2010
    #3
  4. dave

    Tim Harig Guest

    Re: Using Python and Connecting to MySQL remotely WITHOUT MySQLinstalled on local computer

    On 2010-11-18, Steve Holden <> wrote:
    > On 11/17/2010 7:21 PM, Tim Harig wrote:
    >> On 2010-11-18, dave <> wrote:
    >>> http://sourceforge.net/projects/mysql-python/
    >>>
    >>> 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!

    >>
    >> 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.

    >
    > 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.


    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.

    > The pymysql project at http://code.google.com/p/pymysql/ is one such
    > solution, aimed at satisfying Python 3 users without the need to port
    > existing low-level client code.


    That still looks like alpha code. Would you be willing to make a statement
    as to its stability?
    Tim Harig, Nov 18, 2010
    #4
  5. dave

    Steve Holden Guest

    Re: Using Python and Connecting to MySQL remotely WITHOUT MySQLinstalled on local computer

    On 11/17/2010 10:19 PM, Tim Harig wrote:
    > On 2010-11-18, Steve Holden <> wrote:
    >> On 11/17/2010 7:21 PM, Tim Harig wrote:
    >>> On 2010-11-18, dave <> wrote:
    >>>> http://sourceforge.net/projects/mysql-python/
    >>>>
    >>>> 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!
    >>>
    >>> 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.

    >>
    >> 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.

    >
    > 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.
    >
    >> The pymysql project at http://code.google.com/p/pymysql/ is one such
    >> solution, aimed at satisfying Python 3 users without the need to port
    >> existing low-level client code.

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


    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://us.pycon.org/
    See Python Video! http://python.mirocommunity.org/
    Holden Web LLC http://www.holdenweb.com/
    Steve Holden, Nov 18, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick
    Replies:
    3
    Views:
    466
    Nigel Wade
    Jul 19, 2004
  2. Replies:
    4
    Views:
    457
    Oliver Wong
    May 1, 2006
  3. EW
    Replies:
    6
    Views:
    1,043
  4. Replies:
    4
    Views:
    357
  5. Lionel Neo

    Display html on another computer instead of local computer

    Lionel Neo, Oct 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    218
    Robert Koritnik
    Oct 11, 2004
Loading...

Share This Page