title: mysql connect (port,username,password)
body: <p>I am trying to connect to mysql workbench using mysql_connect in php. The trouble is I get absolutely nothing not even an error with the die parameters. I think there is an issue with the values I put in for mysql_connect(hostname,username,password)? I have, I think tried everything including the following from the php manual:</p>
  
  <pre><code>&lt;?php
  $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
  if (!$link) {
  die('Could not connect: ' . mysql_error());&lt;?php
  // we connect to example.com and port 3306
  $link = mysql_connect('example.com:3306', 'mysql_user', 'mysql_password');
  if (!$link) {
  die('Could not connect: ' . mysql_error());
  }
  echo 'Connected successfully';
  mysql_close($link);
  
  // we connect to localhost at port 3306
  $link = mysql_connect('127.0.0.1:3306', 'mysql_user', 'mysql_password');
  if (!$link) {
  die('Could not connect: ' . mysql_error());
  }
  echo 'Connected successfully';
  mysql_close($link);
  ?&gt;
  }
  echo 'Connected successfully';
  mysql_close($link);
  ?&gt;
  
  I'm sure it is something simple!?
  </code></pre>