|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
接触MYSQL,开始设计数据库程序mysql|php5|成绩 MYSQL 4.1今后, 采取了一种新的用户认证协定, 关于老的客户端会呈现不撑持认证协定的毛病, 以下是官方网站的处理办法r
1Upgrade all client programs to use a 4.1.1 or newer client library.
更新客户端库,这需求更新PHP的扩大库,关于老的api PHP已不供应了如许的扩大库了
2When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
利用之前创立的账号毗连,关于在新的认证协定下创立的账户就不可了
3Reset 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.
这是一个不错的举措,新创立的账号采取老式的加密协定
4Tell the server to use the older password hashing algorithm:
Start mysqld with the --old-passwords option.
如许新认证协定的长处就没法利用了
5Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query: mysql> SELECT Host, User, Password FROM mysql.user
-> WHERE LENGTH(Password) > 16;
For each account record displayed by the query, use the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.
恢复已晋级了口令到老款式。 在学习PHP这六个月里,每看到一个优秀的php脚本,就会兴奋的手舞足蹈,嘴里还不停的说:太酷了,太酷了。呵呵,很幼稚吧,但这可能就是兴趣。 |
|