Geralmente o erro que aparece é algo do tipo:
mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in [CAMINHO DO ARQUIVO QUE ESTA TENTANDO CONECTAR] on line [LINHA DA TENTATIVA]
Este erro é apresentado pois em versões anteriores a 5.1 do Mysql o old Authentication está ativo, e o php 5.3 não suporta este tipo de hash de autenticação .
O recomendo é que instale uma nova versão do Mysql. Os Servidores mais recente não possuem o old authentication.
Caso não possa, execute este comando no Mysql:
SET SESSION old_passwords=FALSE;
SET PASSWORD = PASSWORD('[your password]');
No PHP mude a forma de conectar para:
define('CLIENT_LONG_PASSWORD', 1);
mysql_connect('[your server]', '[your username]', '[your password]', false, CLIENT_LONG_PASSWORD);
Desta forma seu problema estará resolvido.
mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in [CAMINHO DO ARQUIVO QUE ESTA TENTANDO CONECTAR] on line [LINHA DA TENTATIVA]
Este erro é apresentado pois em versões anteriores a 5.1 do Mysql o old Authentication está ativo, e o php 5.3 não suporta este tipo de hash de autenticação .
O recomendo é que instale uma nova versão do Mysql. Os Servidores mais recente não possuem o old authentication.
Caso não possa, execute este comando no Mysql:
SET SESSION old_passwords=FALSE;
SET PASSWORD = PASSWORD('[your password]');
No PHP mude a forma de conectar para:
define('CLIENT_LONG_PASSWORD', 1);
mysql_connect('[your server]', '[your username]', '[your password]', false, CLIENT_LONG_PASSWORD);
Desta forma seu problema estará resolvido.
.....................................................................................
Benedito Germano Neponuceno, CBPP
Certified Business Process Professional
+55 61 8485 1510
bgnweb@yahoo.com.br
Certified Business Process Professional
+55 61 8485 1510
bgnweb@yahoo.com.br
.....................................................................................
Nenhum comentário:
Postar um comentário