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

mysqlÊý¾ÝÂÒÂëÎÊÌâÔ­Òò¼°½â¾ö£¨×Ü½áÆª£©

 mysqlÊý¾ÝÂÒÂëÎÊÌâÔ­Òò¼°½â¾ö£¨×Ü½áÆª£©
 
µÚÒ»½â¾ö·½·¨£º
 
      ÂÒÂëÎÊÌâ¼òµ¥Ëµ¾ÍÊÇÊý¾Ý¿âдÈë¶ÁÈ¡£¬ÍøÒ³Îļþ£¬ÍøÒ³ÏÔʾʱ¼¸¸ö»·½ÚµÄ±àÂë²»Ò»ÖÂÔì³ÉµÄ¡£
ÂÒÂëÎÊÌâ
дÈëʱ£ºÒ³ÃæÌáȡдÈëÊý¾Ý±àÂëºÍдÈëÊý¾Ý¿âʱ±àÂë²»Ò»ÖÂ
¶Áȡʱ£º¶ÁÈ¡ºóËùÓñàÂëÓëÊý¾Ý¿âдÈëʱ²»Ò»ÖÂ
ÏÔʾʱ£º±àÂëÓëÊý¾Ý¿â¶ÁÈ¡ºóµÄÊý¾Ý²»Ò»ÖÂ
ºÜÏÔȻֻÓÐÈýÕß¶¼Í³Ò»²ÅÐУº£¨ÒÔutf-8ΪÀý£©
1£ºÒ³ÃæÌá½»Êý¾Ý±àÂëutf-8£¨ÕâÒ²¿ÉÒÔËãÊÇÏÔÊ¾Ò³Ãæ±àÂ룩£¬
2£ºÊý¾Ý¿âдÈëʱ±àÂ룺alter database db default character set ‘utf8’collate ‘utf8-general-ci’£¬
3£ºÊý¾Ý¿â¶ÁȡʱËùÓñàÂ룺mysql_query£¨“set names ‘utf8’”£©£»
4£ºÏÔÊ¾Ò³Ãæ±àÂ룺<meta http-equiv="Content-type"content=“text/html, charset=utf-8”>
 
 
µÚ¶þ½â¾ö·½·¨£º
½øÈëMYSQLÃüÁîÐÐ:
mysql> alter database you_dbname default character set 'utf8';
mysql> SET character_set_client='utf8';
mysql> SET character_set_connection='utf8'
mysql> SET character_set_results='utf8'
 
 
µÚÈý½â¾ö·½·¨£º
£¨ÔÝʱֻÕë¶ÔMySQL 5.0.16 ÂÒÂëÎÊÌâ´¦Àí°ì·¨£¬ÆäËû°æ±¾Î´²âÊÔ¡££©
1 ÉèÖÃphpMyAdmin
¡¡¡¡Language£ºChinese simplified (zh-utf-8)
¡¡¡¡MySQL ×Ö·û¼¯£ºUTF-8 Unicode (utf8)
¡¡¡¡MySQL Á¬½ÓУ¶Ô£ºgbk_chinese_ci
2 ´´½¨Êý¾Ý¿âʱ
¡¡¡¡ÕûÀíÉèÖÃ³É gbk_chinese_ci
3 ÓÃSQL½¨Á¢±íÖÐ
¡¡¡¡ENGINE=MyISAM DEFAULT CHARSET=gbk;
¡¡¡¡ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=40 ;
4 ¼ì²é±í½á¹¹ÖÐ
¡¡¡¡varchar(100) µÄÕûÀíÊôÐÔΪgbk_chinese_ci
¡¡¡¡ÆäËüÀàÐ͵ÄÕûÀíÊôÐÔΪ¿Õ
5 ´úÂëÖмÓÉÏ
¡¡¡¡$db->query("SET CHARACTER SET GBK"); ¡¡LinuxÏÂÐèÒª£¬Windowsϲ»ÐèÒª
¡¡¡¡Õâ¸öÏ൱ÓÚConnection Character Sets and Collations
ÒÔÉÏÊǸöÈË´ÓÍøÉÏËÑË÷µÄһЩ×ܽáºÍ¹éÄÉ£¬ÏàÐÅÕâ¸öÓ¦¸ÃÄܽâ¾öËùÓÐÂÒÂëµÄÎÊÌâÁË¡£
±¾ÎIJ¿·ÖÄÚÈÝ×ªÔØ×Ôphp100.com£¬ÈçÓÐÎÊÌ⣬ÇëÓë±¾ÈËÁªÏµ¡£


Ïà¹ØÎĵµ£º

MySQLѧϰ

»ù±¾µÄMySQLÓï¾äºÜ¼òµ¥£¬ÕâÀïÖ÷Ҫ̸̸һЩÈÝÒ×ÒÅÍüµÄ¡£
1.ÈçºÎÉèÖÃ×ֶεÝÔö
create table tb_User(Id int auto_increment
not null primary key,UserName varchar(50),Password varchar(20));
2.²é¿´±í½á¹¹
desc tb_User;
3.ÈçºÎÐ޸ıí½á
ÖØÃüÃû±í£ºalter table tb_User rename
tb_UserInfo;
Ìí¼ÓÒ»ÁУºalter ta ......

MysqlÊý¾ÝÌáÈ¡Æ÷

        ¼¸¸öÔÂǰ£¬ÊÜһλÀÏʦµÄίÍУ¬Òª°ïËû×öÒ»¸ö¹ØÏµÊý¾Ý¿âģʽÐÅÏ¢ÌáÈ¡µÄСÏîÄ¿£¬Ö÷ÒªµÄ¹¦ÄÜʵÏÖ¾ÍÊǽ«¹ØÏµÊý¾Ý¿âµÄ±í½á¹¹ºÍ×ֶεÄÐÅϢͨ¹ý±í¸ñµÄÐÎʽչʾ³öÀ´¡£ÎÒͨ¹ý´ÓÍøÉÏËѼ¯×ÊÁÏÒÔ¼°·­Êé²éÕÒ£¬ÏÈʵÏÖÁËÒ»¸ömysqlµÄÊý¾ÝÌáÈ¡Æ÷¡£Ïȸø´ó¼Ò·ÖÏíһϡ£ÉÔºóµÄ¼¸ÌìÄÚ»á°ÑÁíÒ»¸ömysql¹ ......

½â¶ÁOracle¼Æ»®£ºSolaris½«±»Õü¾È MySQL¼ÌÐøÇ°Í¾Î´²·


¡¾51CTO.com¶À¼ÒÌØ¸å¡¿Ãæ¶Ô¾ª»ÅµÄ¿Í»§ºÍ¹ã·ºÖÊÒɵÄýÌ壬Oracle¹Ù·½×î½üÖÕÓÚ³ö°ñ°²Ãñ£¬ÄDZãÊÇÒ»¸öÒÔ“SUN CUSTOMERS ,Oracle Plans To£º”Ϊ´ó±êÌâµÄ¹ã¸æ¡£Ö±Òë¹ýÀ´±ã¹ýÀ´¿ÉÖªµÀ£¬Oracle½«Òª¼Ó´óSPARCºÍSolarisµÄͶÈëÁË£¬¶ø´óÀϰ尣ÀïÉ­Ò²ÏòIBMÓ²¼þÏÂÁËÕ½Ê飬Éù³ÆOracle½«×îÖÕÓ®µÃÕⳡ¾ºÕù……
&n ......

ÈçºÎÐÞ¸ÄMySQL rootÃÜÂë

Íü¼ÇMySQL ROOTÃÜÂëÊÇÔÚMySQLʹÓÃÖкܳ£¼ûµÄÎÊÌ⣬¿ÉÊÇÓкܶàÅóÓѲ¢²»»áÖØÖÃROOTÃÜÂ룬Äǽпడ£¬ÎÒÓÐÉîÓид¥£¬ÌØÐ´´ËÎÄÕÂÓë´ó¼Ò½»Á÷£º
 
1¡¢±à¼­MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ÅäÖÃÎļþ£º
windows»·¾³ÖУº%MySQL_installdir%\my.ini
//Ò»°ãÔÚMySQL°²×°Ä¿Â¼ÏÂÓÐmy.ini¼´MySQLµÄÅäÖÃÎļþ¡£
linux»·¾³ÖУº/etc/my.cnf ......

ÓÃMySQL Éú³ÉËæ»úÃÜÂë

ÍíÉÏÓÐÅóÓÑÎÊÆð£¬¼òµ¥µÄдÁËÒ»¸ö¡£
DELIMITER $$
CREATE
    FUNCTION `t_girl`
.
`func_rand_string`
(
f_num tinyint
unsigned
,
f_type tinyint
unsigned
)
    RETURNS varchar
(
32)
    BEGIN
       ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ