title: PHP with PDO using XAMPP and Workbench
body: <p>I'm a begginer in PHP and I'm trying to connect my application with database using PDO.</p>
  
  <pre><code>$dbName = "new_schema";
  $this-&gt;db = new PDO("mysql:host=localhost;dbname=$dbName", "root", "");
  </code></pre>
  
  <p>When I try to run my application, this is the output of browser:</p>
  
  <pre><code>Fatal error: in C:\xampp\htdocs\Project\application\model-database.class.php on line 10
  </code></pre>
  
  <p>Line 10 is this:</p>
  
  <pre><code>$this-&gt;db = new PDO("mysql:host=localhost;dbname=$dbName", "root", "");
  </code></pre>
  
  <p>In Workbench, Hostname is set as <em>localhost</em>, port <em>3308</em> and username <em>root</em>. No password. Connection name is <em>Local instance mysqlweb</em>.</p>
  
  <p>In Xampp, Mysql run on port 3308.</p>
  
  <p>Thanks very much for any help. :)</p>
  
  <p>EDIT:</p>
  
  <p><a href="https://i.stack.imgur.com/k6iRw.png" rel="nofollow noreferrer">This is the browser output</a></p>
  
  <p>Now, the error is <strong>could not find driver</strong>.</p>