0

I am able to connect my Python program with lampp server using mysqldb as host="localhost" but as soon as change host="myIPaddress" it is showing errors for sql queries.

This is working fine:

database=MySQLdb.connect(host="localhost",user="root",passwd="",db="TextMiner",unix_socket="/opt/lampp/var/mysql/mysql.sock")

But this is showing error:

database=MySQLdb.connect(host="myIPaddress",user="root",passwd="",db="TextMiner",unix_socket="/opt/lampp/var/mysql/mysql.sock")

Error:

_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'myIPaddress' (110)")

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Check your sql security settings. Must be set to local only.

Anoj
  • 1