Hi, All I am unable to connect to mysql for querying some data that I could use in my python script. Here is my python script. #!/usr/bin/python import os import re import json import MySQLdb from freeswitch import * db = MySQLdb.connect("localhost","root","hammer","gvt") def handler(session, args): session.answer() callerNumber=session.getVariable("caller_id_number") calleeNumber=session.getVariable("destination_number" consoleLog("info", callerNumber) consoleLog("info", calleeNumber) When i run this i got this error. 2014-09-16 04:55:18.803406 [ERR] mod_python.c:239 Error reloading module 2014-09-16 04:55:18.803406 [ERR] mod_python.c:164 Python Error by calling script "load": <class '_mysql_exceptions.InternalError'> Message: (-1, 'server not initialized') Exception: None Traceback (most recent call last) File: "/usr/lib/python2.7/load.py", line 9, in <module> File: "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect File: "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 179, in __init__ Could someone please help me out how to connect freeswitch to mysql for querying data..:) Thanks in Advance
participants (1)
-
Aqs Younas