/    Sign up×
Community /Pin to ProfileBookmark

hi,
i am new to mysql databas
i am not getting connected to my databse .

can u see what these warning messages are trying to say
=========================================================

Warning: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:Documents and SettingsAVINASHDesktopNew Folderorbitphpchatter_beta1_20050504orbitphpchatter.php on line 321

Warning: MySQL Connection Failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:Documents and SettingsAVINASHDesktopNew Folderorbitphpchatter_beta1_20050504orbitphpchatter.php on line 321
Could not connect to the Database, please check your Database Settings

========================================================

-ashish

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 10.2006 — What does your mysql_connect() line look like? Make sure you've included all 3 args: host, user, and password; e.g.:
[code=php]
$connection = mysql_connect("localhost", "username", "password") or die("DB Connection failed");
[/code]
Copy linkTweet thisAlerts:
@ashishrathoreauthorFeb 10.2006 — yes

$dbc = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if (!$dbc) {

die('<b>Could not connect to the Database, please check your Database Settings</b>');

exit;

}

mysql_select_db (DB_NAME);
Copy linkTweet thisAlerts:
@ashishrathoreauthorFeb 10.2006 — or u can have



================================================================

<?php

/**

* Auth.php file - used to set some main varibles and a connection to the database server

*


* Mark - 12/30/01 9:26pm

**
/


$link = mysql_connect($config['dbserver'], $config['dbuser'], $config['dbpass']);

if (!$link)

{

die("Error connecting to database server!");

}

mysql_select_db($config['dbname'], $link)

or die("Error selecting database!");

session_start();

$tmp = time() + 300;

$sql = "DELETE FROM ".$config['db_prefix']."sessions

WHERE session_time > '$tmp'";

$sql = mysql_query($sql);

$sql = "SELECT * FROM ".$config['db_prefix']."rooms ORDER BY room_name ASC";

$sql = mysql_query($sql);

if (!$sql)

{

die($lang['mysql_error']);

}

while ($tmpvar = mysql_fetch_array($sql))

{

$auth['main_room_name']['room_id'][] = $tmpvar['room_id'];

$auth['main_room_name']['room_name'][] = $tmpvar['room_name'];

$auth['main_room_name']['room_desc'][] = $tmpvar['room_desc'];

$auth['main_room_name']['room_crtr'][] = $tmpvar['room_crtr'];

$auth['main_room_name']['room_crtr_ip'][] = $tmpvar['room_crtr_ip'];

}

$auth['main_room_name']['room_numrows'] = mysql_num_rows($sql);

$num_rows = $auth['main_room_name']['room_numrows'];

for ($i=0; $i >= $num_rows; $i++)

{

$tmpvar = $auth['main_room_name']['room_name'][$i];

$sql = "SELECT * FROM ".$config['db_prefix']."sessions

WHERE session_room='$tmpvar'";

$sql = mysql_query($sql) or die("MySQL Error: ".mysql_error() );

$auth['global_roomchatters'][$i] = mysql_num_rows($sql);

}

if (!isset($chat_cookie))

{

$auth['main_bl_users'] = "You must be logged in to view your buddy list.";

}

else

{

$auth['main_bl_users'] = "<img src="./images/bl_online.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">Mark</a><br>".

"<img src="./images/bl_online.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">Alicia</a><br>".

"<img src="./images/bl_online.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">Tyler</a><br>".

"<img src="./images/bl_online.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">Tina</a><br>".

"<img src="./images/bl_offline.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">Admin</a><br>".

"<img src="./images/bl_offline.gif">&nbsp;".

"<a href="./bl.php?mode=prvtmsg" onclick="NewWindow(this.href,'sndmsg','400','400','no');return false;">VoicedCow666</a><br><br>".

"<a href="./bl.php?mode=viewlist&list=buddy" onclick="NewWindow(this.href,'viewfull','400','400','yes');return false;">View full list</a>";

}


if(isset($chat_cookie) )

{

$sql = "SELECT * FROM ".$config['db_prefix']."users

WHERE user_name='$session_user'";

$sql = mysql_query($sql);

while ($a_row = mysql_fetch_array($sql) )
{
$auth['user']['user_id'][] = $a_row['user_id'];
$auth['user']['user_name'][] = $a_row['user_name'];
$auth['user']['user_password'][] = $a_row['user_password'];
$auth['user']['user_email'][] = $a_row['user_email'];
$auth['user']['user_rname'][] = $a_row['user_rname'];
$auth['user']['user_ip'][] = $a_row['user_ip'];
$auth['user']['user_level'][] = $a_row['user_level'];
$auth['user']['user_active'][] = $a_row['user_active'];
$auth['user']['user_fc'][] = $a_row['user_fc'];
$auth['user']['user_ff'][] = $a_row['user_ff'];
$auth['user']['user_fb'][] = $a_row['user_fb'];
$auth['user']['user_fi'][] = $a_row['user_fi'];
$auth['user']['user_fu'][] = $a_row['user_fu'];
$auth['user']['user_gag'][] = $a_row['user_gag'];
}

}

?>


================================================================
Copy linkTweet thisAlerts:
@chazzyFeb 10.2006 — That error's typically (50/50) due to:

  • - the client extensions not being installed on one or more of the servers in question

  • - php not configured properly to send out the connection request or it being blocked on the server end.
  • Copy linkTweet thisAlerts:
    @ashishrathoreauthorFeb 10.2006 — i got the solution by installing the full php files.

    actually i was using the files that come with PHPtriad apache server

    now its working

    thanks

    -ashish
    ×

    Success!

    Help @ashishrathore spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...