#!/usr/bin/python
mydb
= mysql.connector
.connect
( host="localhost",
user="myusername",
password="mypassword"
)
mycursor = mydb.cursor()
mycursor.execute("SHOW DATABASES")
for x in mycursor:
print(x)
print(type(mycursor))
IyEvdXNyL2Jpbi9weXRob24KCgppbXBvcnQgbXlzcWwuY29ubmVjdG9yCgpteWRiID0gbXlzcWwuY29ubmVjdG9yLmNvbm5lY3QoCiAgaG9zdD0ibG9jYWxob3N0IiwKICB1c2VyPSJteXVzZXJuYW1lIiwKICBwYXNzd29yZD0ibXlwYXNzd29yZCIKKQoKbXljdXJzb3IgPSBteWRiLmN1cnNvcigpCgpteWN1cnNvci5leGVjdXRlKCJTSE9XIERBVEFCQVNFUyIpCgpmb3IgeCBpbiBteWN1cnNvcjoKICBwcmludCh4KQpwcmludCh0eXBlKG15Y3Vyc29yKSkK