Mysql°²×°
windows주
½â¾ö°ì·¨£º
1.¼ì²éÄãµÄMysqlĿ¼ÓÐûÓиøϵͳµÄSystemÓû§È¨ÏÞ¡£
2.ɾ³ýµôÄãµÄ %WINDOWS%/my.ini Îļþ¡£
3.¼ì²éÄãµÄ c:/my.cnf ÎļþÅäÖÃÊÇ·ñÕýÈ·¡£
ÐÞ¸Ä%windir%\my.ini£¬Ôö¼Ó
[mysqld]
#ÉèÖÃbasedirÖ¸ÏòmysqlµÄ°²×°Â·¾¶
basedir=D:\Program\Tools\mysql
datadir=D:\Program\Tools\mysql\data
ÒýÓà 9 Â¥ acmain_chm µÄ»Ø¸´:
¼ì²éÒ»ÏÂÄãµÄ C:\MySQL Datafiles Ŀ¼µÄȨÏÞÉèÖá£ÊÚ¸ø everyone FULLµÄȨÏÞÈ»ºóÔÙÊÔһϡ£
ÎÊÌâÎÒ½â¾öÁË£¬¾ÍÊÇ°ÑÄã˵µÄÕâ¸öĿ¼ÎÒ×Ô¶¨ÒåÁËÒ»¸ö£¬ÔÚdÅÌÏÂÁË£¬½á¹ûºÜ˳ÀûµÄ¾Í°²×°ÉÏÁË£¬
ллÄã¡£
Ïà¹ØÎĵµ£º
Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º
......
MySQLµÄ×Ö·û¼¯ÎÊÌâ¡£WindowsÏ¿Éͨ¹ýÐÞ¸Ämy.iniÄÚµÄ
CODE:
# CLIENT SECTION
[mysql]
default-character-set=utf8
#
SERVER SECTION
[mysqld]
default-character-set=utf8
Õâ
Á½¸ö×Ö¶ÎÀ´¸ü¸ÄÊý¾Ý¿â
µÄ
ĬÈÏ×Ö·û¼¯¡£µÚÒ»¸öÊÇ¿Í»§¶ËĬÈϵÄ×Ö·û¼¯£¬µÚ¶þ¸öÊÇ·þÎñÆ÷¶ËĬÈϵÄ×Ö·û¼¯¡£¼ÙÉèÎÒÃÇ°ÑÁ½¸ö¶¼ÉèΪutf8£¬È»ºó ......
ÎÒÓõÄÊÇmysql5.0£¬
ÎÒ³ÌÐòÖÐÓõ½ÁËÒ»¾äsqlÊÇ
SQL code
select count(DISTINCT id) from Policyinfo p where p.filename not in
(select p2.filename from Policyreadinfo p2 where p2.reader='test')
µ«ÊÇÿ´ÎÔÚ³ÌÐòÖÐÿ´ÎÖ´ÐÐÕâ¾äsqlʱÍøÒ³¾ÍÌØÂý£¬Òª10¶àÃ룬¶øÕâ2¸ö±íµÄ¼Ç¼ÐÐÊýÒ²¾Í1000¶à¶øÒÑ£¬ÎÒ°ÑÕâ¾äsqlµ¥¶ÀÄ ......
Èç¹ûÒªÁ˽âMySQLÊý¾Ý¿âËø¶¨»úÖÆ£¬Ê×ÏÈÁ˽âÒ»ÏÂMySQLµÄÈýÖÖËø¶¨ÀàÐÍ£º
Ò»£¬Ðм¶Ëø¶¨
¶þ£¬±í¼¶Ëø¶¨
Èý£¬Ò³¼¶Ëø¶¨
ÕâÈýÖÖËø¶¨ÀàÐÍ£¬ÔÚMySQLÊý¾Ý¿âÖÐʹÓÃÈçÏ£º
Ðм¶Ëø¶¨£ºMyISAM£¬Memory£¬CSV[·ÇÊÂÎñÐԵĴ洢ÒýÇæ]
±í¼¶Ëø¶¨£ºInnoDB£¬NDB Chuster
Ò³¼¶Ëø¶¨£ºBerkeley DB
Á½ÖÖËø¶¨»úÖÆ£º¶ÁËø¶¨ºÍдËø¶¨
MySQLÊý¾Ý¿âËø¶ ......