title: mysql_connect(): No such file or directory
body: <p>I have just installed a MySQL server (version 3.23.58) on an old RedHat7. I cannot install a more recent MySQL version because of the dependencies. I cannot update librairies on this RedHat server.</p>
  
  <p>However, I have a problem connecting to the database with PHP. First I used PDO but I realized that PDO was not compatible with MySQL 3.23...</p>
  
  <p>So I used <code>mysql_connect()</code>. Now I have the following error:</p>
  
  <pre><code>Warning: mysql_connect(): No such file or directory in /user/local/apache/htdocs/php/database.php on line 9
  Error: No such file or directory
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>$host = 'localhost';
  $user = 'root';
  $password = '';
  $database = 'test';
  $db = mysql_connect($host, $user, $password) or die('Error : ' . mysql_error());
  mysql_select_db($database);
  </code></pre>
  
  <p>I checked twice that the database exists and the login and password are correct.</p>
  
  <p>This is strange because the code works fine on my Windows PC with Wampp. I cannot figure out where the problem comes from.</p>
  
  <p>Any idea?</p>