Estoy usando MySQL 5 server, y el servidor apache , al hacer esta connecion :
<?php
$link = mysql_connect('localhost', '', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
me aparece este error:
Could not connect: Access denied for user 'ODBC'@'localhost' (using password: NO)
y si le pongo:
<?php
$link = mysql_connect('localhost', 'root', 'cambito');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
me aparece este error:
Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client
QUE ES LO QUE DEBO DE HACER PARA HACER UNA BUENA CONNECION A MI BD DE MYSQL
SI ALGUIEN TIENE UNA GUIA CORRECTA PARA CONFIGURAR PHP PARA HACER LAS CONNECCIONES BIEN .