I am using mysql with python 3.7.2 to get connected my database.
on my windows 2008r2 ,I have installed first sql server 2012 and later also mysql.
I want to know what would be my mysql instance name as localhost would be sql server 2012 and when I am trying to connect it ,it gives me access denied error.code is as follows:-
on my windows 2008r2 ,I have installed first sql server 2012 and later also mysql.
I want to know what would be my mysql instance name as localhost would be sql server 2012 and when I am trying to connect it ,it gives me access denied error.code is as follows:-
import pymysql conn=pymysql.connect('localhost','root@localhost','mcse@123','mysqldb') if not conn!=None: print("Connection Succeeded") cmd=conn.cursor() cmd.execute('create table emp(empid int,empname char(10))') conn.close() cmd=conn.cursor() cmd.execute("insert into emp values(111,'asha')") conn.commit() conn.close() cmd.cursor() cmd.execute('select * from emp') result=cmd.fetchall() for i in result: print(i) conn.close()Thanx in adavnce