52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
Yahoo!憟拇撠
望: 璈A
Google憟拇撠
望: 璈A
     
亦: 4087|敺: 0
銝銝銝駁 銝銝銝駁

[mysql] 閫瘙 php叮ysql隞孑ysqli_connect()蝑蝑航炊==>mysqlnd cannot connect to MySQL 4.1

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2018-10-11 12:57:07 | 芰閰脖 撣 |摨閬 |梯璅∪
酥hp 5.5隞乩 銝 mysql 5.2 嚗叮ysql隞 mysqli_connect() Y航炊mysqli_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').0 Y+ R+ y8 |0 O7 K& W5 W, C1 o
; {4 I1 n( U7 a4 R$ |. f
臬歉hp 5.3隞亙撖蝣潭16雿蝺函Ⅳ,啁php 5.3隞亙41雿蝺函Ⅳ,mysql 5.2 隞亙閮凋16蝣,隞交甇斤車航炊.
9 F0 E, e8 H5 Z閮箸瑚銝mysql: (php 5.6.38 , mysql 5.1.73)
( F+ G' j( ~; {% ~3 b5 z餃叮ysql 嗅頛詨 :
; U' |* U; s, Q3 Kmysql> SHOW VARIABLES LIKE 'old_passwords';
* \! k, M; q. m& n# G% ~) w4 Z5 k+------------------+-------+
# e& _/ u7 o4 }$ \* P+ F| Variable_name | Value |. k+ w, c6 m* {# ]
+------------------+-------+8 |% s8 d$ W! o" |
| old_passwords | ON   |& d5 R2 y1 z& [
+------------------+-------+" B0 x8 b+ k  d: {. w2 M6 l, Y
1 row in set (0.00 sec)
9 T9 Q! _1 b8 [* A' _. Y0 [: k" J8 w; y, q  W2 z- m
old_password  ==> ON  撠梯”蝷 /etc/my.cnf  鋆 old_passwords=1  閮剖16蝣,撠摰閮剔 0 嗅mysqld ==> service mysqld restart& x' k: @& s3 f( k
mysql prompt銝頛詨:; ^& |4 V1 |8 Y0 V! e7 W
mysql> SET old_passwords=FALSE;  
  E" m# i" t: {' d0 T瑼X叮ysql.user 瘥撖蝣潮瑕漲:
% ?/ n5 L0 v2 ~/ S: Nmysql> SELECT 'User', 'Host', Length('Password') FROM mysql.user;
& x& V* v! M; u/ I) k, _/ \; ^, b憒瘝寞41雿,Length('Password')甈雿閰脤賣160(銵函內瘝閮剖蝣)
$ R+ m  ?0 v9 L' o: g% M: s+ q4 S; L+ [5 f
閮剖靘撖蝣:5 E: J3 z8 s* c" i  \8 O2 P
mysql> SET PASSWORD FOR 'root'@'192.168.1.1' = PASSWORD('靘撖蝣');    // 撠敹閬詨靘 撣唾@IP 湔,銝閬寥臭
6 J, d5 w7 E6 }. o. T8 H. ?! i7 V) {( {mysql> flush privileges;
! }7 T4 U  l2 c5 r$ g. v' n+ i4 f7 Z5 ^  q* j! b
頛詨 SELECT 'User', 'Host', Length('Password') FROM mysql.user; 瑼X亙蝣澆漲,撠勗舐潛曉寧root 撖蝣潮瑕漲撌脫寧41蝣
; l8 K2 v- _7 v( l1 V瘜冽:2 d' I; ]  b2 m6 y
憒撣唾憭芸,臭誑啣憿閮剖蝣,粹閮剖蝣 SET PASSWORD FOR 芷撠亙蝣,銝 old_passwords=0 撠撖蝣潮敶梢
===========================================================================0 [" m# q- A8 O* y
鄉ysql蝝 8.0.21,php逅ysql箇2銵errors:% O7 O1 y3 @. G: F  \0 |
mysqli_real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers4 E% X: L- X+ B* w$ H" Q
mysqli_real_connect(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers& V. t) Q) {6 X
:
* \& {' R" U5 L2 T  k* ^  G
決ySQL 8.0.21銝哨caching_sha2_password舫隤頨思遢撽霅隞塚銝臭誑敺mysql_native_password隞亙php銝詨捆臭誑蝝php嚗銋臭誑靽格遍ySQL蝵柴 曆犖瘙箏靽格遍ySQL蝵:
5 l7 Q0 H# S0 {6 s+ rvi /etc/my.cnf  乩:* ]- Z6 E: P3 q. j
[mysqld]: ^" [  n6 a& _# g: y3 u" V6 X
+ t; b; ]( _* [+ D, z" [5 x
character-set-server=utf82 ^1 J! L" ^$ s8 M  T+ [
default_authentication_plugin=mysql_native_password
" U4 E; ^4 c& n8 b6 z2 \& ]8 ]! x' o
[mysql]. y9 O2 i% X  Q
default-character-set=utf85 m- J( X" b- T$ L: a
: E# j$ Q8 u* V9 ]9 h, }! L
[client]
3 \) K7 f5 G: K9 e8 o3 ndefault-character-set=utf8" y7 M1 T7 P$ k* z& V# ]
, T& F% |' t5 Z: j" n
嗅mysqld! V. {4 r( `7 U" ~; p/ K2 v1 P
service mysqld restart
* E0 J& o+ V" ^: K% {+ j摰!!5 |$ N0 P  W; e0 W
+ @9 @: R. W) F. I% G

* n6 S4 [0 O; F/ W7 @$ T

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-4 17:11 , Processed in 0.064558 second(s), 16 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵