MySQL Bağlantı Sorunu

Merhaba. Tkinter kütüphanesiyle birlikte bir arayüz oluşturduktan sonra MySQL’e bağlayıp, bu arayüz aracılığıyla kayıt eklemek istiyorum. Fakat hata alıyorum. Kodumdaki hataları veya eksikleri bir türlü anlayamadım. Yardımcı olursanız çok memnun olurum.

from tkinter import*
import mysql.connector
yenikayit=Tk()
yenikayit.title("Yeni Kayıt")
yenikayit.geometry("1000x600+200+50")
yenikayit.resizable(FALSE,FALSE)


def kayit_ekle():
    sorgu = "INSERT INTO kullanici_bilgileri (tc_no, ad, soyad, dogum_tarihi, telefon, e_posta) VALUES (%s, %s, %s, %s, %s, %s)"
    deger = (tc_no_entry.get(), ad_entry.get(), soyad_entry.get(), dogum_tarihi_entry.get(), telefon_entry.get(),
             e_posta_entry.get())
    mycursor.execute(sorgu, deger)
    veritabani.commit()


veritabani = mysql.connector.connect(
    host="localhost",
    user="root",
    passwd="",
    database="kayit"
)
mycursor = veritabani.cursor()
print(mycursor.rowcount, "Kayıt eklendi.")
tc_no = Label(
    yenikayit,
    text="T.C. No",
)
tc_no.place(relx=0.10, rely=0.30, anchor=W)
tc_no_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
tc_no_entry.place(relx=0.25, rely=0.30, anchor=W)
ad = Label(
    yenikayit,
    text="Ad"
)
ad.place(relx=0.10, rely=0.35, anchor=W)
ad_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
ad_entry.place(relx=0.25, rely=0.35, anchor=W)
soyad = Label(
    yenikayit,
    text="Soyad"
)
soyad.place(relx=0.10, rely=0.40, anchor=W)
soyad_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
soyad_entry.place(relx=0.25, rely=0.40, anchor=W)
dogum_tarihi = Label(
    yenikayit,
    text="Doğum Tarihi (gün.ay.yıl)"
)
dogum_tarihi.place(relx=0.10, rely=0.45, anchor=W)
dogum_tarihi_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
dogum_tarihi_entry.place(relx=0.25, rely=0.45, anchor=W)
telefon = Label(
    yenikayit,
    text="Telefon (+90)"
)
telefon.place(relx=0.10, rely=0.50, anchor=W)
telefon_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
telefon_entry.place(relx=0.25, rely=0.50, anchor=W)
e_posta = Label(
    yenikayit,
    text="E-Posta"
)
e_posta.place(relx=0.10, rely=0.55, anchor=W)
e_posta_entry = Entry(
    yenikayit,
    bd=1,
    width=35
)
e_posta_entry.place(relx=0.25, rely=0.55, anchor=W)
onayla=Button(
    yenikayit,
    text="Onayla",
    width=15,
    bg="forestgreen",
    fg="white",
    bd=0,
    command=(kayit_ekle)
)
onayla.place(relx=0.75, rely=0.95, anchor=W)
mainloop()