Thread: Python & MySQL

Page 3 of 3 First 123
  • Jump to page:
    #31
  1. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    wx_uab - it looks like it's dead Most of the links point to one of those scum domain parking sites (seeq.com), and it apparently works on Windows 95 and 98 .
  2. #32
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    Bimingham,AL
    Posts
    68
    Rep Power
    11
    Sorry about that , Here is the actual link

    http://gadfly.sourceforge.net/gadfly.htm
    l used it really long time back for a small school project . I really helped me then.I didn't know it was dead . sorry
  4. #33
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    5
    Rep Power
    0
    Another newbie here. Ive got a python program running on my windows xp pro machine that is the same line for line as one i am running on a unix machine. If I run my program on the unix machine (which has mysql on it) it works just fine. My problem is on my windows machine.
    self.connObj = Connection(user="***", passwd="*****",
    db="**", host="obsidian.myschool.edu")

    is it possible to connect to this dbServer from my windows box?

    the code on the linux box has 'localhost' for the host param.

    Any help would be much appreciated.
  6. #34
  7. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    wx_uab: It does look like a cool project - hopefully they'll keep working on it.

    jdvachal: The code works when it runs on the same linux machine as MySQL right? you'll need to check to see if the MySQL server will allow remote connects. The quickest way to do this is to ask the admin. The next thing you'll need to do is to make sure that your username has permission to connect from a remote host. You'll need to check MySQL's grant tables here.

    --Simon
  8. #35
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    5
    Rep Power
    0
    The code does work when i run it on the linux box yes.
    There really isnt an admin for the database because its just a machine at the school that I run.
    Here are some stats.
    The column names:
    | Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |


    | % | **** | *** | Y | Y | Y | Y | Y | Y | Y | Y|Y |Y|Y|Y| Y | Y|

    this is the entry in the user table for the username im connecting with. So the user im connecting with is a superuser.
    Im looking into whether mysql accepts incoming connections but the machine doesnt have nmap so i will try and find away around that. If its not accepting connections do you know how to enable that?
  10. #36
  11. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    Ok, the user can connect from anywhere ('%').

    To check if MySQL accepts foreign connections run:
    mysqladmin -u <user> -p variables

    and look for skip_networking. You'll want this set to 'OFF'.
  12. #37
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    5
    Rep Power
    0
    skip networking is set to off. Do I need some kind of odbc driver?
  14. #38
  15. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    Shouldn't need one.

    Ok, you should be able to connect like that, but you may need to set the port in the connection string to MySQL's port - 3306.

    PHP Code:
    self.connObj Connection(user="***"passwd="*****"db="**"host="obsidian.myschool.edu"port='3306'
    It may pay to replace obsidian..etc with an ip address too.
  16. #39
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    5
    Rep Power
    0
    Still no dice,
    I hate to keep bugging you but heres the dump:
    Traceback (most recent call last):
    File "C:\Python23\demomaint.py", line 65, in -toplevel-
    app = App(root)
    File "C:\Python23\demomaint.py", line 10, in __init__
    self.init_db()
    File "C:\Python23\demomaint.py", line 61, in init_db
    db="****", host="****", port = 3306)
    File "C:\Python23\lib\site-packages\MySQLdb\connections.py", line 116, in __init__
    self._make_connection(args, kwargs2)
    File "C:\Python23\lib\site-packages\MySQLdb\connections.py", line 41, in _make_connection
    apply(super(ConnectionBase, self).__init__, args, kwargs)
    OperationalError: (2003, "Can't connect to MySQL server on '****' (10061)")

    heres the line of code:
    self.connObj = Connection(user="****",passwd="****",
    db="****", host="****", port = 3306)
  18. #40
  19. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    There are a few threads on error 10061 in the MySQL forum - it usually happens when windows can't run MySQL, so I'm not sure why you're getting it here. I would just doublecheck to make sure MySQL is running on the remote server.
  20. #41
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    5
    Rep Power
    0
    ok mysql is running on the remote computer, i just downloaded sqlyog and it cant connect to the remote server either so i need to figure out why i cant connect to the remote box. Its probably something that needs to be set up on the other machine.
    Thanks for all your help.
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo