主页
Python
Python MySQL Create Database 语句
demo_mysql_db_exist
运行 ❯
×
更改方向
保存代码
更改主题
import mysql.connector mydb = mysql.connector.connect( host="localhost", user="myusername", password="mypassword", database="mydatabase" ) #If this page is executed with no error, the database "mydatabase" exists in your system
C:\Users\My Name>python demo_mysql_db_exist.py