I'm trying to connect to my MySQL database, I do not want to recognize the localhost, it bounces in error:
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
eng = create_engine("mysql+mysqldb:///host='localhost', user='root', passwd='...',port='3307', database='Nomina_jul15',echo=True")
connection = eng.connect()
I get this error:
_mysql_exceptions.OperationalError) MySQL server on 'localhost' (10061) ")
With pymsql:
eng = create_engine("mysql+pymysql:///....
I get this error:
([WinError 10061] No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión)")
I am somewhat confused because with MySQL and SQL statements it works normally, I can make the changes and queries I need.