title: How to use `pd.read_sql` using `mysql.connector`
body: <p>I know we can read <code>sql</code> using different packages than <code>mysql.connector</code> but since I only know <code>mysql.connector</code>, I want to use it to read a table from <code>sql</code> and save it as <code>dataframe</code> in pandas.
  I have the following as my code.</p>
  <pre class="lang-py prettyprint-override"><code>import mysql.connector
  import pandas as pd
  
  mydb = mysql.connector.connect(
      host = 'localhost',
      user = 'root',
      passwd = '*',
      database = 'mydatabase'
  )
  
  mycursor = mydb.cursor()
  
  query = &quot;SELECT * FROM my table&quot;
  df = pd.read_sql(query, mycursor)
  
  </code></pre>
  <p>I am not sure about the last line, that is <code>df = pd.read_sql(query, mycursor)</code>. I think I am missing some arguments here.
  Can you please help me with that?</p>