title: trouble connecting to MySql DB (PHP)
body: <p>I have the following PHP code to connect to my db: </p>
  
  <pre><code>&lt;?php
  ob_start();
  $host="localhost"; // Host name
  $username="root"; // Mysql username
  $password=""; // Mysql password
  $db_name="test"; // Database name
  $tbl_name="members"; // Table name
  
  // Connect to server and select databse.
  mysql_connect("$host", "$username", "$password")or die("cannot connect");
  
  ?&gt;
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <pre><code>Warning: mysql_connect() [function.mysql-connect]: [2002] A 
  connection attempt failed because the connected party did not (trying 
  to connect via tcp://localhost:3306) in C:\Program Files (x86)\EasyPHP-
  5.3.2i\www\checklogin.php on line 11
  
  Warning: mysql_connect() [function.mysql-connect]: A connection 
  attempt failed because the connected party did not properly respond 
  after a period of time, or established connection failed because 
  connected host has failed to respond. in C:\Program Files (x86)\EasyPHP-
  5.3.2i\www\checklogin.php on line 11
  
  Fatal error: Maximum execution time of 30 seconds exceeded in 
  C:\Program Files (x86)\EasyPHP-5.3.2i\www\checklogin.php on line 11
  </code></pre>
  
  <p>I am able to add a db/tables via phpmyadmin but I can't connect using PHP. </p>
  
  <p>Here is a screenshot of my phpmyadmin page:
  <img src="https://i.stack.imgur.com/jswUI.jpg" alt="enter image description here">
  What could be the problem?</p>