0

I'm using Wamp Server's MySQL. I had to change port from 80 to 8000 by setting "Listens" in httpd.conf and also in httpd-vhosts. I have access to phpMyAdmin by browser (localhost:8000/...) but when I'm trying to connect by program like this:

 dbConn = MySQLdb.connect(host='192.168.1.110',port=8000, user='root', passwd='', db='test')

It freezes, and after exactly 60 seconds I'm getting error:

super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 0")

Before port change it was working fine.

What should I do? Thanks in advance

EDIT: It works when I change port to 3306 and uncomment line skip-grant-tables in my.ini

MrRiddle
  • 3
  • 2
  • You're problem is in your own statement. You can't run two different services off the same port. If phpmyadmin is on 8000 you can't run the sql server on 80000 – Kwright02 Sep 03 '18 at 17:33
  • @Kwright02 I have Apache on 8000 but MySQL runs on 3306 (Wamp server default). When I'm changing port to 3306 I get error :`_mysql_exceptions.OperationalError: (1130, "Host '192.168.1.110' is not allowed to connect to this MySQL server")` – MrRiddle Sep 03 '18 at 17:58
  • Ok nevermind... I thought that's the same error where the port doesn't really exist. @Kwright02 Thanks for targeting me :) – MrRiddle Sep 03 '18 at 18:10

1 Answers1

0

I think you changed phpMyadmin port, but you didn't change mysql default port (3306).

See here How to change the default port of mysql from 3306 to 3360

sxn
  • 157
  • 1
  • 7