¼Ç¼µã¶«Î÷£¬MSSQL£¬MySQL£¬.NETµÄMD5¼ÓÃÜ
MSSQL:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),32)
MSSQL16λ:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),16)
MySQL:select md5('123456')
.NET:string ½á¹û×Ö·û´®=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(ÊäÈë×Ö·û´®,"MD5");
.NET16λ:System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16) ;
Ïà¹ØÎĵµ£º
ÐÂʹÓÃMySQL£¬ËµÆðÀ´ÊǸö¼òµ¥µÄÊÂÇ飬µ«ÊÇÈ´·ÑÁËЩÖÜÕÛ£º
1¡¢µÇ½·þÎñÆ÷¶Ë£¬½øÈëÃüÁîÐУ¬windows cmd;
2¡¢ÉèÖÃÓû§¡¢ÃÜÂëÈÃÖ¸¶¨µÄIP·ÃÎÊ£ºmysql -u root -p »ò°²×°µÄ¿ì½Ý·½Ê½½øÈë:MySQL Command Line Client,ʹÓÃgrantÃüÁ
grant ȨÏÞ1,ȨÏÞ2,…ȨÏÞn on Êý¾Ý¿âÃû³Æ.±íÃû³Æ to Óû§Ãû@Óû§µØÖ· identified ......
ºÜ¶àÅóÓѶ¼ÓйýÕâÑùµÄ¾Àú,½«mysqlÉý¼¶µ½4.1(»òÒÔÉÏ)°æ±¾ºó,¾ÉµÄ³ÌÐò´ÓÊý¾Ý¿â¶Á³öÀ´µÄ¶¼±ä³ÉÂÒÂëÁË.Õâ¸öÎÊÌâÍøÉϺܶàÕâ·½ÃæµÄÌÖÂÛ,ÆäʵÊÖ²áÉÏÒѾÓйØÓÚÕâ·½ÃæµÄÏêϸ˵Ã÷,
ÒÔÏÂÄÚÈÝÕª×ÔmysqlÊÖ²á,
²úÉúÕâ¸öÎÊÌâµÄÔÒòÊÇ:
MySQL 4.1.x¿ªÊ¼Ö§³ÖÒÔÏÂÕâЩÊÂÇé
· ʹ ......
1. ÔÚ/etc/my.cnfÖмÓÈëÒ»ÏÂÄÚÈÝ
[mysqld_dev]
socket=/tmp/mysql.sock
port=3307
pid-file=/var/run/mysqld/mysqld_dev.pid
datadir=/var/lib/mysql_dev
log=/var/log/mysqld_dev.log
log-error=/var/log/mysqld_dev.err.log
user=mysql
2. ¸ù¾ÝÒÔÉÏÄÚÈÝ´´½¨Ä¿Â¼ºÍÎļþ
mkdir /var/lib/mysqld_dev
chown mys ......
Èç¹ûÄãÊǸöÈü³µÊÖ²¢ÇÒ°´Ò»Ï°´Å¥¾ÍÄܹ»Á¢¼´¸ü»»ÒýÇæ¶ø²»ÐèÒª°Ñ³µ¿ªµ½³µ¿âÀïÈ¥»»£¬ÄÇ»áÊÇÔõô¸Ð¾õÄØ£¿MySQLÊý¾Ý¿âΪ¿ª·¢ÈËÔ±Ëù×öµÄ¾ÍºÃÏñÊÇ°´°´Å¥»»ÒýÇ棻ËüÈÃÄãÑ¡ÔñÊý¾Ý¿âÒýÇ棬²¢¸øÄãÒ»Ìõ¼òµ¥µÄ;¾¶À´Çл»Ëü¡£
MySQL µÄ×Ô´øÒýÇæ¿Ï¶¨Êǹ»ÓÃÁË£¬µ«ÊÇÔÚÓÐЩÇé¿öÏ£¬ÆäËûµÄÒýÇæ¿ÉÄÜÒª±ÈÊÖÍ·ËùÓøüÊʺÏÍê³ÉÈÎÎñ¡£Èç¹ûÔ¸Ò ......