Conectar ao Openfire usando Python

Bom dia Pessoal

Alguem já usou Script Python pra conectar ao Openfire ?

Esse meu script não tá conectando , o que será que tá errado ? é um servidor Linux que eu tenho aqui na empresa instalado o Openfire. Alguem pode me dar uma dica ? Obrigado

import mysql.connector
con = mysql.connector.connect(
host=‘172.16.1.111’,
database=‘openfire’,
user=‘root’,
password=‘xxxxxx’
)
cursor = con.cursor()
if con.is_connected():
db_info = con.get_server_info()
print(“Conexão realizada com Sucesso !”, db_info)

******* SAIDA**********

C:\Python\Contrato\venv\Scripts\python.exe C:\Python\Contrato\teste4.py
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: Host ‘172.16.1.82’ is not allowed to connect to this MySQL server

The script that you provide creates a connection to a database, not to Openfire. Maybe it is the database that is also used by Openfire.

Your database server (MySQL) is configured to not allow connections from the user that is being used by the script, from the computer that is running the script.

Mas nas configuraçãoes do Openfire está configurado para qualquer

You have confused various applications and connection protocols, I think.

You cannot use a MySQL connection to connect to Openfire. You will need to use an XMPP library to connect to Openfire. For Python, several libraries are available. Some of them are listed on XMPP | XMPP Software

Gostaria de conectar nesse banco de dados aqui
Sem título