MySQL remote Verbindung schlägt fehl mit "unknown authentication method"

Ich versuche, Remote-Verbindung zum MySQL-server online von meiner lokalen Maschine, aber ich erhalte die folgende Fehlermeldung:

Warning: PDO::__construct(): The server requested authentication 
method unknown to the client [mysql_old_password] in 
C:\xampp\htdocs\ticket\terminal\sync.php

SQLSTATE[HY000] [2054] The server requested authentication method 
umknown to the client

Meinem lokalen MySQL-server-version 5.5.27, libmysql - mysqlnd 5.0.10
Der remote-MySQL-server-version 5.5.23, die mysqlnd-version ist nicht ausgesetzt.

Ich denke, es ist eine inkompatible Kennwort-hash-Problem, aber ich weiß nicht, wie es zu lösen.
Unten ist ein Teil meiner Verbindung code

$dsn = 'mysql:host=184.173.209.193;dbname=my_db_name';
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
); 

try {
    $online_dbh = new PDO($dsn, 'myusername', 'mypassword', $options);
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Congratulations!";
} catch (PDOException $e) {
    echo $e->getMessage();
} 
InformationsquelleAutor Chibuzo | 2013-01-30
Schreibe einen Kommentar