MySQL Forums
Forum List  »  Portuguese

Conectar Banco MySql me ajudem por favor.
Posted by: Alessandro Cardoso
Date: March 12, 2024 05:26AM

Bom dia pessoal

Ao tentar conectar em um Banco de Dados MySQL que tenho em um servidor Linux através de um código Python eu recebo a seguinte mensagem :

Traceback (most recent call last):
File "C:\Python\Contrato\venv\Lib\site-packages\mysql\connector\connection_cext.py", line 323, in _open_connection
self._cmysql.connect(**cnx_kwargs)
_mysql_connector.MySQLInterfaceError: Access denied for user 'localhost'@'172.16.1.82' (using password: NO)

Segue a minha string de conexão :

import mysql.connector
con = mysql.connector.connect(
host='172.16.1.111',
database='openfire',
user='localhost',
password='sp@rk'
)
cursor = con.cursor()

Onde estou errando ?

Obrigado

Options: ReplyQuote


Subject
Views
Written By
Posted
Conectar Banco MySql me ajudem por favor.
162
March 12, 2024 05:26AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.