查看所有数据库 from mysql.db_object import Databasedb = Database(host="localhost",port=3306,database="",username="root",password="zhangdapeng520")print(db.get_all_database()) 删除数据库 from mysql.db_object
创建数据库 create database gx character set utf8mb4; 连接数据库 #!/usr/bin/python3import mysql as pymysql# 打开数据库连接db = pymysql.connect(host='localhost',port=3306,user='root',password='zhangdapeng520',datab