mySQL4.1 - PHP5 - conversion PHP4
Bonjour
Je viens de passer à PHP5 et mySQL 4.1 et j'ai vu que pour faire communiquer les 2, il fallait utiliser les commandes "mysqli...".
Je voudrais savoir s'il y a possibilité de rentre compatibles des sites PHP4 utilisant "mysql..." avec cette nouvelle version de mySQL. Si j'essaie de lancer un de ces sites, j'obtiens :
Client does not support authentication protocol requested by server
Merci
Re: mySQL4.1 - PHP5 - conversion PHP4
Citation:
Envoyé par messier79
Je voudrais savoir s'il y a possibilité de rentre compatibles des sites PHP4 utilisant "mysql..." avec cette nouvelle version de mySQL.
Apparemment il faut mysqli pour se connecter à MySQL >= 4.1.3.
Essaye ceci quand même :
Citation:
Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Alternatively, use UPDATE and FLUSH PRIVILEGES:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;
Substitute the password you want to use for ``newpwd'' in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.
http://dev.mysql.com/doc/mysql/en/Old_client.html