Прошу прощения, если я разместил это в неправильном разделе, я новичок в stackoverflow и я поискал похожие темы, но не получил то, что мне нужно.
Так что я пытаюсь сделать, получить информацию о таблице из базы данных mysql в форме: ((1, Google, имя пользователя1, пароль1), (2, Facebook, имя пользователя2, пароль2) ...)
И заполните это в древовидном представлении, которое имеет 4 столбца Веб-сайт, имя пользователя, пароль , который выглядит следующим образом: 
Что я пробовал:
#find password
def find_password(selection):
#remove the frame if it already exists
for child in frame.winfo_children():
child.destroy()
#to fill tree with tuples
def show_table(table):
for x in table:
tree.insert("", 0, text=x)
#button1 function
def btn_input_one(text1):
text_input = text1.get("1.0", "end-1c")
connection = mysql.connector.connect(host='localhost',database='suryansh',user='suryansh',password='suryansh')
if connection.is_connected():
cursor = connection.cursor(buffered = True)
cursor.execute("select database();")
#sql queries
create_table_query = "select * from " + text_input
cursor = connection.cursor(buffered = True)
result = cursor.execute(create_table_query)
table = cursor.fetchall()
show_table(table)
Это то, что я попробовал и вот что я получил: 