title: PHP - MySQL connection for specified port settings
body: <p>I've got my own DB.php and it was working before I changed the MySQL Port to something else other than 3306 which is default. It fails to connect now; I've configured the DB.php after port change like below :</p>
  
  <pre><code>class DB {
  //    server    
      private $host = "192.168.1.15";
      private $uname = "user";
      private $pw = "iamuser";
      private $dbname = "matlab";
      private $con = null;
      private $port = "669";
  
  public function __construct() {
          $this-&gt;con = mysql_connect($this-&gt;host,$this-&gt;port, $this-&gt;uname, $this-&gt;pw);
          if (!$this-&gt;con) {
              $this-&gt;db_error("Cannot connect to DBMS");
          }
          mysql_query("SET NAMES 'latin5'", $this-&gt;con);
          mysql_query("SET CHARACTER SET 'latin5'", $this-&gt;con);
          mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'", $this-&gt;con);
          mysql_select_db($this-&gt;dbname, $this-&gt;con) or db_error("Can not connect to Database");
      }
  </code></pre>
  
  <p>Can anyone tell me how I can make it work with the port number 669 again?
  Thanks.</p>