title: Do I need to use mysql_close(connection)?
body: <p>I have the following code in db.php to connect to my DB.</p>
  
  <pre><code>&lt;?php
  $DB_HOST        = "localhost";
  $DB_NAME        = "db";
  $DB_USER        = "user";
  $DB_PASSWORD        = "pass";
  
  $con = mysql_connect($DB_HOST, $DB_USER, $DB_PASSWORD);
  
  if (!$con)
  {
    die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db($DB_NAME , $con);
  ?&gt;
  </code></pre>
  
  <p>In my other script I include it using:</p>
  
  <pre><code>include("db.php");
  </code></pre>
  
  <p>In some cases I receive the ff error:</p>
  
  <p>[10-Mar-2012 10:47:20] PHP Warning:  mysql_connect() [function.mysql-connect]: User db_user already has more than 'max_user_connections' active connections in /home/user/public_html/sc/db.php on line 8</p>
  
  <p>Now, I am wondering if I need to close the connection like:</p>
  
  <pre><code>&lt;?php
  include("db.php");
  
  //other stuff here
  
  mysql_close($con);
  ?&gt;
  </code></pre>
  
  <p>BTW, I have a value of 100 max_connections in my MySQL config.</p>
  
  <p>I also research about persistent connection and I believe my code above is not a persistent connection.</p>