Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > PHP: Базы Данных > mysql_connect error.


Автор: AlDev 3.6.2005, 20:03
Сори за дурацкий вопрос, но php при попытке использования mysql_connect выдаёт:
Цитата

Client does not support authentication protocol requested by server; consider upgrading MySQL client


код php:
Код

<?
if(!mysql_connect("localhost","root","blablabla"))
{
  echo mysql_error();
}
?>


Как бороться?

Автор: Mal Hack 3.6.2005, 20:11
Чтобы избавиться от:
Цитата
Client does not support authentication protocol requested by server; consider upgrading MySQL client

надо:
Цитата
This is permanent solution. Instead of typing this "SET PASSWORD FOR peter@localhost = OLD_PASSWORD('something');" in the command line client for every single user, do the following:


Find "my.ini" inside windows directory and insert the following lines (First line is just a comment, it can be ommited)

#Use old password encryption method (needed for 4.0 and older clients).
old_passwords

Restart the service for the changes to take place.

http://forums.mysql.com/read.php?11,6400,6731#msg-6731

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)