Mysql db bağlanma PHP5.3 tatili için Güncelleştirme

3 Cevap php

Ben sadece 5.3 php güncellenmiş ve artık benim uzak MySQL sunucuya bağlanabilirsiniz. Ben aşağıdaki hataları alıyorum:

mysqli_connect(): OK packet 6 bytes shorter than expected
mysqli_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication

Bu yeni mysqlnd sürücüsü ile ilgisi var gibi görünüyor. Eski libmysql sürücüyü kullanmaya zorlamak için bir yolu var mı. Ayrıca, php5.2.11 geri dönmeyi çoğu insan için çalışmak gibi görünüyor sorunu gidermek için görünmüyor.

3 Cevap

Peki ben uzun soğuk yanıtını yazdığınız ama benden daha iyi birisi zaten yanıtladı. TLDR; Bu yanıtın uygulamanız için php derlemeniz olduğunu.

http://news.php.net/php.internals/43535

Ionut G. Stan schrieb:

Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in {filename} on line 18 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in {filename} on line 18

Bu her şeyi söylüyor. Sen mysqlnd eski kimlik doğrulaması kullanamazsınız.

Upgrade you server passwords to the more recent and more secure authentication method or recompile PHP with libmysql (MySQL Client Library) support. Check ./configure --help | grep -C3 mysql and http://www.php.net/manual/en/mysql.installation.php .

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

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.

Tell the server to use the older password hashing algorithm:

Start mysqld with the --old-passwords option.

Bu sayfada daha birçok seçenek vardır ....

Bkz this.

Sadece kullanıcının parolasını sıfırlayın.

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');