title: (1045, "Access denied for user 'root'@'ip-address' (using password: YES)") in python
body: <p>I want to access MySql database hosted on domain <strong>my_domain_name</strong>  using pymysql ( python library) .
  My code is:</p>
  
  <pre><code>connection = pymysql.connect('my_domain_name', user, passd, db)
  </code></pre>
  
  <p>But I receive this error</p>
  
  <pre><code>(1045, "Access denied for user 'root'@'ip-address' (using password: YES)")
  </code></pre>
  
  <p>In most answers, people suggest that: </p>
  
  <blockquote>
    <p>either password is wrong or 'root' user do not have privileges to
    access database</p>
  </blockquote>
  
  <p>But, I can access the database using direct link as: <a href="http://www.my_domain_name/phpmyadmin/index.php" rel="nofollow noreferrer">http://www.my_domain_name/phpmyadmin/index.php</a> using same user and password. 
  I will appreciate your kind help. Thanks </p>
  
  <hr>
  
  <p>Note: <strong>'my_domain_name'</strong> is being converted to an <strong>ip_address</strong>. When I place this IP to my browser, it takes me to the website of my Internet provider.  </p>
  
  <hr>
  
  <p>Update:
  It is clear that <strong>domain_name</strong> is being replaced with <strong>ip_address</strong> of Internet provider. How can I resolve this issue? Please do share any link. Thanks. </p>