Thread: Python & sql

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    10
    Rep Power
    0

    Question Python & sql


    I wanted to ask you guys few questions about python and sql together.

    So, i am supposed to make a program that connects with online sql database, and make it able to write and read content on online sql db. I was reserching online a lot, and i though that this is the way i'm gonna cover this thing with sql: 'SqlAlchemy'. But i also heard so many things about python connecting with online db, about how you need to have installed some kind of mysql or what ever drivers, so your python program could actually connect with sql database.

    My program should be compiled after all with py2exe ( i guess), And it would be very bad if users of that program had to install some kind of drivers..

    I searched a lot, but for final answers and consultations i would like to hear those from this community, cause i found this place most quality.

    Questions:
    What module(or what ever) should i use in my program so i could connect with ONLINE (remote host) sql database ( it's not localhost)?

    Do users of that program need to install some kind of extra drivers or something similar?



    Also all advices about py and sql are welcome, this is my first time i doing something with sql.
    Thank you in advance!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Iran
    Posts
    149
    Rep Power
    140
    Unless you have users accessing a Web application (through their web browsers), any direct access to a remote/local database on a given computer requires a python specific driver to be installed.

    http://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python


    Regards,
    Dariyoosh
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    10
    Rep Power
    0
    Is there any solution for not installing the driver? It's really stupid to install a driver, no one would do that. Is there any ways around? Could driver be installed thru python program? Any solution? Also isn't there already installed drivers for sql on windows?

IMN logo majestic logo threadwatch logo seochat tools logo