Welcome Guest, Not a member yet? Register   Sign In
I can't connect to mysql
#5

[eluser]John_Betong[/eluser]
 
I use this test code in all my ./config/database.php files:
Code:
$link = &mysql;_connect
                (
                    $db['default']['hostname'],
                    $db['default']['username'],
                    $db['default']['password']
                    // FALSE,
                    // 128
                );
            
if (!$link) {
  die('Not connected : ' . mysql_error());
}

// check the current db
$db_selected = mysql_select_db($db['default']['database'], $link);
if (!$db_selected) {
    die ('Can\'t use <b>' .$db['default']['database'] .'</b> : ' . mysql_error());
}
&nbsp;
&nbsp;
&nbsp;


Messages In This Thread
I can't connect to mysql - by El Forum - 12-08-2009, 11:08 PM
I can't connect to mysql - by El Forum - 12-08-2009, 11:18 PM
I can't connect to mysql - by El Forum - 12-08-2009, 11:23 PM
I can't connect to mysql - by El Forum - 12-09-2009, 12:21 AM
I can't connect to mysql - by El Forum - 12-09-2009, 12:25 AM
I can't connect to mysql - by El Forum - 12-09-2009, 02:11 AM
I can't connect to mysql - by El Forum - 12-09-2009, 02:39 AM
I can't connect to mysql - by El Forum - 12-09-2009, 03:05 AM
I can't connect to mysql - by El Forum - 12-09-2009, 04:04 AM
I can't connect to mysql - by El Forum - 12-09-2009, 07:09 AM
I can't connect to mysql - by El Forum - 12-09-2009, 07:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB