MySQL No Connection Could Be Made Because the Target MAChine Actively Refused It

Mysql No connection could be made because the target machine actively refused it

Well this might be late but for future visitors,

I found out back then that biz.nf refuses any connections to it's DB from outside source which means that only the web-apps hosted on biz.nf have the access to their DB other than that you will get rejected.

Mysql Python Connector No connection could be made because the target machine actively refused it

I think there are 2 possible options:

  1. Database is not running (as proposed by John).
  2. Your database is not running directly on your pc but on a VM or docker image.

    In that case, user shall not be bound to 'localhost' but to '%' that stands for 'any location'. This is because VMs and docker containers run in a separate environment, and 'localhost' users login is accepted from the host running the database only.

    Obviously this introduces a security concern since that login will be accepted from any place (localhost, other PCs in private network and other PCs on the internet network).


Related Topics



Leave a reply



Submit