I have installed mariaDb (Mysql) on my raspberry pi .I am trying to connect my db using python from another machine over the same network but I receive the below error .
self.sock.connect(sockaddr)
ConnectionRefusedError: [Errno 61] Connection refused
The above exception was the direct cause of the following exception:
Both my machine and raspberry pi are over the same network . I can connect when I run the code on raspberry pi using localhost but running the same code on another machine gives above error .
import mysql.connector
if __name__ == '__main__':
db = mysql.connector.connect(host='192.168.0.108',user='admin123',password='abcd',database='cdr_mapping')
print(db)
Is there any config for mariadb which I need to set ?