I have a problem with inserting records in MySQL database with python, using the code shown below I try to insert the values that I show and they do not appear in the DB. I made a query and if it is done correctly, I checked the parameters and also they do not have any errors, I have an arduino that continuously inserts in that database so I doubt that the problem is of the DB. Everything I do in Raspbian using a Raspberry Pi 3
The code below
import mysql.connector
dato = {
'user':'user',
'password':'password',
'database':'database',
'host':'www.midireccion.com'
}
con = mysql.connector.connect(** dato)
cursor = con.cursor()
valores = "INSERT INTO DispData (Dis,H,S) VALUES
('85439313130351D032D0','62','0')"
try:
con.cursor(valores)
con.commit()
print("Valores ingresados correctamente")
except:
print("Error")
con.close()