title: TypeError: _init_() takes 1 positional argument but 5 were given
body: <p>This is the Python code where I am establishing a database connection. But I am getting a type error in my code. Please tell me what is the issue.</p>
  <pre><code>import pymysql
  
  connnection = pymysql.connect(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;dbname&quot;)
  </code></pre>
  <p>Error:</p>
  <pre><code>Traceback(most recent call last):
  
   File &quot;c:/Users/Dell/Desktop/Full Code/COllectUrls.py&quot;, line 21, in &lt;module&gt;
  
     connnection = pymysql.connect(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;dbname&quot;)
  
  TypeError: _ init _() takes 1 positional argument but 5 were given
  </code></pre>