|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
甚至一个有经验的Windows管理者也可以轻松部署并开始学习它,而你不需投入一分钱来了解这个数据库。client|mysql|request|serverMYSQL匡助:A.2.3Clientdoesnotsupportauthenticationprotocol
MySQL4.1andupusesanauthenticationprotocolbasedonapasswordhashingalgorithmthatisincompatiblewiththatusedbyolderclients.Ifyouupgradetheserverto4.1,attemptstoconnecttoitwithanolderclientmayfailwiththefollowingmessage:
shell>mysqlClientdoesnotsupportauthenticationprotocolrequestedbyserver;considerupgradingMySQLclient
Tosolvethisproblem,youshoulduseoneofthefollowingapproaches:
Upgradeallclientprogramstousea4.1.1ornewerclientlibrary.Whenconnectingtotheserverwithapre-4.1clientprogram,useanaccountthatstillhasapre-4.1-stylepassword.Resetthepasswordtopre-4.1styleforeachuserthatneedstouseapre-4.1clientprogram.ThiscanbedoneusingtheSETPASSWORDstatementandtheOLD_PASSWORD()function:
mysql>SETPASSWORDFOR->some_user@some_host=OLD_PASSWORD(newpwd);
Alternatively,useUPDATEandFLUSHPRIVILEGES:
mysql>UPDATEmysql.userSETPassword=OLD_PASSWORD(newpwd)->WHEREHost=some_hostANDUser=some_user;mysql>FLUSHPRIVILEGES;
Substitutethepasswordyouwanttousefor``newpwdintheprecedingexamples.MySQLcannottellyouwhattheoriginalpasswordwas,soyoullneedtopickanewone.Telltheservertousetheolderpasswordhashingalgorithm:Startmysqldwiththe--old-passwordsoption.Assignanold-formatpasswordtoeachaccountthathashaditspasswordupdatedtothelonger4.1format.Youcanidentifytheseaccountswiththefollowingquery:
mysql>SELECTHost,User,PasswordFROMmysql.user->WHERELENGTH(Password)>16;
Foreachaccountrecorddisplayedbythequery,usetheHostandUservaluesandassignapasswordusingtheOLD_PASSWORD()functionandeitherSETPASSWORDorUPDATE,asdescribedearlier.
Foradditionalbackgroundonpasswordhashingandauthentication,seesection5.5.9PasswordHashinginMySQL4.1.
例子:
SETPASSWORDFOR用户名@localhost=OLD_PASSWORD(暗码);
只需每年花费2000到5000美元。无论你是自掏腰包来创建一个新兴公司,还是得到了风险投资商的赞助,使用MySQL都可以降低你所需要的人力成本。 |
|