Error unclear when TCP port is not an integer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
Confirmed
|
Low
|
Geert JM Vanderkelen |
Bug Description
Hi,
I am just 1 day old with python. I use Bash for doing most of the scripting. Thought of giving python a try. I installed mysql.connector module and I used the code posted in http://
#!/usr/bin/python
import mysql.connector
if __name__ == "__main__":
db = mysql.connector
cursor = db.cursor()
cursor.
for row in cursor.fetchall():
print row
cursor.close()
db.close()
When I run the script, its giving me error.
$ ./3.py
Traceback (most recent call last):
File "./3.py", line 5, in <module>
db = mysql.connector
File "/usr/lib/
return MySQL(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise errors.
mysql.connector
I am sure that I am missing something here. Would appreciate if you can point me out what I am doing wrong here. Thanks in advance.
Regards,
Kurian Thayil.
port="3307" must be port=3307
The error message is not clear enough. I'll see if we can handle this better.