Home
A quick summary of Home
Page About Nothing
Welcome to my Wiki!
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
import mysql.connector
weblist = ["ericafox", "ericascott", "ericastevens", "samarafox", "samarastevens", "williamscott", "woodytheduck"]
mydb = mysql.connector.connect(
host="localhost",
user="william",
passwd="password"
)
mycursor = mydb.cursor()
for db in weblist:
mycursor.execute("GRANT ALL PRIVILEGES ON " + db + ".* TO 'admin'@'localhost'")