0
votes

Just baked an app and got this on my cake homepage

Warning (2): mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554) [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 561]

Warning (2): mysql_connect() [function.mysql-connect]: OK packet 1 bytes shorter than expected [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 561]

Warning (2): mysql_connect() [function.mysql-connect]: 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 [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 561]

Cake is NOT able to connect to the database.

This issue only occurs when connecting to a remote database, connecting to a localhost database gives me no problems.

1

1 Answers

0
votes

http://dev.mysql.com/doc/refman/5.1/en/old-client.html

The database is using an old-style of password hash for the user that mysql_connect is trying to login with. The mysql driver in php that you are running is incompatible with the old-style of password hash. As it says, it wants you to regenerate the password using the new-style of hash.

This problem isn't really related to cakephp, but rather PDO and its mysql driver.