MySQLdb1 icon indicating copy to clipboard operation
MySQLdb1 copied to clipboard

localhost+port = default port

Open vzong opened this issue 4 years ago • 0 comments

db = MySQLdb.connect(host="localhost", port=12345, user=mysql_user, passwd=mysql_password, db="configdb", charset='utf8', connect_timeout=10) print(db.port) # 12345 but connect to default port 3306.

if host="127.0.0.1", port=12345 connect to 12345.

vzong avatar May 25 '21 03:05 vzong