When connecting to the mysql database, an exception appears

can anyone help me, I am trying to connect mysql database, the server details are entered correctly, but when I call the open method, the program throws an exception. I also used Server explorer, in this case the program sees the server, but I don’t know how to use the database connected through Server explorer,… Read More When connecting to the mysql database, an exception appears

how apply conditional statement on sql query result in python

In python , i want to apply following if condition on mysql result. but it is not able to compare the result, what i do?? In this code there is table named as ‘mansih’ but still it’s not printing ‘hello’. dir=ptr.execute(‘show tables’) for i in ptr.fetchall(): print(i) if i== ‘mansih’: print(‘hello’) the output of this… Read More how apply conditional statement on sql query result in python