title: mysql_connect(): No such file or directory in /opt/lampp/htdocs/
body: <p>I have installed XAMPP on my Ubuntu 14.0.04 and I'm trying to connect to my MySQL server from PHP file but I'm getting an error:</p>
  
  <blockquote>
    <p><b>Warning</b>:  mysql_connect(): No such file or directory in <b>/opt/lampp/htdocs/value.php</b> on
     line <b>3</b><br />
    not connected<br /></p>
  </blockquote>
  
  <p>my <code>value.php</code> file contains</p>
  
  <pre><code>&lt;?php
  
  $con = mysql_connect('localhost:3307', 'root', '');
  if ($con) echo 'Connected';
  else echo 'not connected';
  ---
  ?&gt;
  </code></pre>
  
  <p>and my MySQL server is up and running and my server is also running.</p>