title: Trying MySQL On Internet
body: <p>I have created a MySQL database with PhpMyAdmin and extracted it to my <em>www</em> folder. My PHP Code is</p>
  
  <pre><code>&lt;?php
      $servername = "localhost";
      $username = "gultekin";
      $password = "20Rp3855";
  
      try {
          $conn = new PDO("mysql:host=$servername;dbname=denemevt", $username, $password);
          // set the PDO error mode to exception
          $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
          echo "Connected successfully";
          }
      catch(PDOException $e)
          {
          echo "Connection failed: " . $e-&gt;getMessage();
          }
  
  
       ?&gt;
  </code></pre>
  
  <p>Then I opened it using my browser locally;</p>
  
  <p><em>http://localhost:8080/vtdeneme/baglan3.php</em></p>
  
  <p>It works properly, and the "Connected successfully" writes on screen.</p>
  
  <p>Then I uploaded my <em>baglan3.php</em> and MySQL database to my website (Using Filezilla). However, when I enter my website this warning message appears:</p>
  
  <blockquote>
    <p>"Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'gultekin'@'localhost' (using password: YES)"</p>
  </blockquote>
  
  <p>My password and username is correct (because it was working on my computer)</p>
  
  <p>What can be the reason for that error?  </p>