title: Create a mysql database login interface with Pyqt5
body: <p>I'm learning how to code, and I was attempting to create a pyqt5 login interface where potential user can input host, user, password and daabase and log into mysql database
  Simple enough, except that I'm a total newbie who wanna shift career to coding, so I don't seem to be able to grab the input into my .connect() no matter how hard  tried.
  I've been attempting for 3 futile days now so if someone can help me I'll be grateful
  That's my code</p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import *
  import MySQLdb as mdb
  
  
  class App(QWidget):
  
  
  def __init__(self):
      super().__init__()
      self.title = 'Login'
      self.top = 100
      self.left = 100
      self.width = 400
      self.height = 400
      self.Log()
  
  
  
  def Log(self):
      self.setWindowTitle(self.title)
      self.setGeometry(self.top, self.left, self.height, self.width)
  
      self.host = QLineEdit(self)
      self.host.setPlaceholderText('Host')
      self.host.move(100, 100)
      self.user = QLineEdit(self)
      self.user.setPlaceholderText('User Name')
      self.user.move(100, 150)
      self.pw = QLineEdit(self)
      self.pw.setPlaceholderText('Password')
      self.pw.move(100, 200)
      self.db = QLineEdit(self)
      self.db.setPlaceholderText('Database')
      self.db.move(100, 250)
  
      btn = QPushButton('Click to login', self)
      btn.move(100, 300)
      btn.clicked.connect(self.SQL)
  
      self.show()
  
  def SQL(self):
      try:
         conn = mdb.connect(suppsed to tak input from above here)
         QMessageBox.about(self, 'Connection', 'Done')
      except:
          QMessageBox.about(self, 'Connection', 'Failed')
  
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = App()
      sys.exit(app.exec_())
  </code></pre>