Skip to content

Instantly share code, notes, and snippets.

View andrinheusser's full-sized avatar
🦕

Andrin Heusser andrinheusser

🦕
View GitHub Profile
from MySQLdb import connect
conn = connect(user="[USER]", passwd= "[PASSWORD]")
cur = conn.cursor()
cur.execute("show databases;")
dbs_to_update = filter(
lambda db: db not in ('information_schema', 'mysql', 'performance_schema'),
[dbname[0] for dbname in cur.fetchall()])