title: how to connect to mysql database from gui made in python
body: <p>I have used Tkinter to create radiobuttons  through which I would like to increment by one in the database after the submit button is clicked  whenever a radiobutton is checked.</p>
  
  <p>Most important i would like to connect to MySQL database but I don't know what to add in my script.</p>
  
  <pre><code>from Tkinter import *
  root= Tk()
  frm=Frame(root,relief=RAISED,borderwidth=5,bg="green" )
  Label(frm,text= "PLEASE SELECT CANDIDATE\n OF YOUR CHOICE\n\n\n\n",bg="green").pack()
  var = IntVar()
  for text, value in [('YOWERI KAGUTA MUSEVENI', 1), ('KIIZA BESIGYE', 2), ('AMAAMA JOHN MBABAZI ', 3),
  ('KARUNGI SHARON', 4), ('BYAMUKAMA OSCAR', 5),
  ('MATILDA MOREEN', 6), ('DUNCANS', 7)]:
  
   Radiobutton(frm, text=text, value=value, variable=var,padx=18,bg="green"
   ).pack(anchor=E, fill=X, padx=18 )
   var.set(0)
  frm.pack(pady=10)
  btn=Button(frm,text='submit',fg="black",bg="yellow")
  btn.pack(anchor=E)
  root.title("movie chooser")
  
  root.mainloop()
  </code></pre>