📅  最后修改于: 2022-03-11 15:05:31.544000             🧑  作者: Mango
import mysql.connector
conn = mysql.connector.connect (user='user', password='password',
host='server_address',buffered=True)
cursor = conn.cursor()
databases = ("show databases")
cursor.execute(databases)
for (databases) in cursor:
print databases[0]