點樣改到SQL database password?

個database係駁住一個web,入面其中一個table裝住userID and password
但係個web interface唔係我寫,我只能夠修改SQL server內的data.
想問下點先可以改到password,因為直接睇sql個table就係一堆亂碼既號,應該唔可以直接改個table黎改密碼.
呢個情況,點先可以改到密碼呢?

SET PASSWORD FOR [email protected] = PASSWORD('newpassword');

係sql query度打上面個句試下

TOP

可能個PW HASH左...你要問返佢係MD5定SH1或者其他....

TOP

最簡單可以試左改個password做你想要既password sin睇下得唔得先.

for example (mysql) :
update tablexx set pw=password('abcd1234') where ID='peter';

咁個password應該改左做abcd1234.

[ 本帖最後由 jj2a3 於 2009-9-2 13:58 編輯 ]

TOP

原帖由 普通人士 於 2009-9-2 11:02 AM 發表
SET PASSWORD FOR [email protected] = PASSWORD('newpassword');

係sql query度打上面個句試下

hash 左都得?

TOP

我估係hash左,睇番個SQL table,個password係出號亂碼咁
即係話多數就咁用SQL係改唔到?

TOP

原帖由 正宗球迷 於 2009-9-2 17:46 發表
我估係hash左,睇番個SQL table,個password係出號亂碼咁
即係話多數就咁用SQL係改唔到?

The example in 4# has already told you that you can change the password using SQL.  password() is one of the MySQL function to encrypt the password.  There are another functions, such as md5() and sha1().

Refer to the doc of your SQL server.

TOP