OurSQL is the MySQL driver for Python, more here. I fail with the connection, I doubt the problem to be with port or host -- more details here about environment vars, I am working with Ubuntu.
$ cat t.py
import oursql
conn=oursql.connect(db='test', user='root', passwd='hello')
#, port=3306)
#, host='127.0.0.1')
conn=oursql.connect(db='test')
curs = conn.cursor(oursql.DictCursor)
curs = conn.cursor(try_plain_query=False)
a=curs.execute('SELECT * from test.pic')
print(a)
$ cat test.sql
select * from test.pic;
$ python t.py |wc
1 1 5
$ mysql test < test.sql |wc
9 78 610
WHY DIFFERENT LENGTHS??
THIS LINE WRONG (above)????
conn=oursql.connect(db='test', user='root', passwd='hello')