Enviado em 25/05/2019 - 20:12h
Olá, estou com problemas pra conectar ao mysql no mysql.connector do python, dá o seguinte erro
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/mysql/connector/__init__.py", line 179, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mysql/connector/connection.py", line 95, in __init__
self.connect(**kwargs)
File "/usr/lib64/python2.7/site-packages/mysql/connector/abstracts.py", line 716, in connect
self._open_connection()
File "/usr/lib64/python2.7/site-packages/mysql/connector/connection.py", line 206, in _open_connection
self._socket.open_connection()
File "/usr/lib64/python2.7/site-packages/mysql/connector/network.py", line 512, in open_connection
errno=2003, values=(self.get_address(), _strioerror(err)))
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused)