Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¸ü¸ÄMySqlÊý¾Ý¿âµÄĬÈϱàÂë¸ñʽ

Ò»¡¢ÉèÖÃÊý¾Ý¿â±àÂë
°²×°mysqlʱ¿ÉÑ¡Ôñ±àÂ룬Èç¹ûÒѾ­°²×°¹ý£¬¿ÉÒÔ¸ü¸ÄÎļþmy.ini(´ËÎļþÔÚmysqlµÄ°²×°Ä¿Â¼ÏÂ)ÖеÄÅäÖÆÒԴﵽĿµÄ£»´ò¿ªÎļþÕÒµ½Á½´¦£º
[client]
port=3306
[mysql]
default-character-set=gb2312
# The default character set that will be used when a new
schema or table is
# created and
no character set is defined
default-character-set=gb2312
¸ü¸ÄºìÉ«²¿·ÖΪgb2312
´Ëʱн¨Êý¾Ý¿âºó£¬Êý¾Ý¿âĿ¼ÏÂÓиödb.optÎļþ£¬ÄÚÈÝÈçÏ£º
default-character-set=gb2312
default-collation=gb2312_chinese_ci
±àÂëÊý¾Ý¿âÒ»ÖÂ
¶þ¡¢¿Í»§¶Ë¹¤¾ß±àÂë
±àÂëÉèÖÃÓëÊý¾Ý¿â
±àÂëÏàͬ£¬¿ÉÒÔÓÿͻ§¶Ë¹¤¾ßÖ±½ÓдÈëÊý¾Ý£¬²»²úÉúÂÒÂ룻
Èý¡¢web.configÖÐÉèÖÃ
Á¬½Ó×Ö·û´®ÖеıàÂ룬MySQL
Connector Net 5.0.3ÓÃ
<
connectionStrings
>
    
<
add
name
="MySqlServer"

connectionString
="Data Source=127.0.0.1;User
ID=root;Password=123;DataBase=BOOK;Charset=gb2312"
/>
  
</
connectionStrings
>
¶ÁȡдÈëµÄ±àÂë
<
globalization
responseEncoding
="gb2312"

requestEncoding
="gb2312"
/>


Ïà¹ØÎĵµ£º

MysqlµÄvarcharÀàÐÍ

×Ô´ÓÈÏʶmysqlµÄÄÇÌìÆð¾ÍÖªµÀvarcharµÄ³¤¶ÈÏÞÖÆΪ255£¬²»¹ýÏÖÔÚÕâÖÖÇé¿öÒѾ­¸Ä±äÁË£º
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 by ......

¼Ç¼µã¶«Î÷£¬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.HashPasswordForStoringInConfigFil ......

ÔÚmysqlÊý¾Ý¿âÖÐÈÕÆÚÓëlongÐ͵Äת»¯

1¡¢ÔÚmysql Êý¾Ý¿âÖУ¬“2009-09-15 00£º00£º00”ת»¯ÎªÁÐΪ³¤ÕûÐ͵ĺ¯Êý£º
select unix_timstamp("2009-09-15 00£º00£º00")*1000,
ÕâÀïҪעÒ⣬mysqlÊý¾Ý¿âÖеij¤ÕûÐÍ£¬±ÈjavaÖеij¤ÕûÐÍÉÙÁËÃëºóÃæµÄºÁÃëÊý£¬ËùÒÔÒª³ËÒÔ1000£¬ÕâÑùÖ»Óм¸ºÁÃëÖ®²î
2¡¢ÔÚmysqlÊý¾Ý¿âÖУ¬“1252999488000”£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ