+ 2
How to connect database using MySQL, can anyone answer ???
Whats the command
3 Antworten
+ 3
Judging by your chosen nick you want the answer for python.
import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="yourusername",
password="yourpassword"
)
That requires you to install the mysql-connector-python module using pip. You find the above example code and more information here:
https://www.w3schools.com/python/python_mysql_getstarted.asp
Further links (which I have not read):
https://realpython.com/python-mysql/
https://www.mysqltutorial.org/python-mysql/
+ 3
Thanks buddy 👍🏻
+ 1
You're welcome.