Mysql my.ini ÅäÖÃÎļþÏê½â
Mysql my.ini ÅäÖÃÎļþÏê½â
#BEGIN CONFIG INFO
#DESCR: 4GB RAM, ֻʹÓÃInnoDB, ACID, ÉÙÁ¿µÄÁ¬½Ó, ¶ÓÁиºÔØ´ó
#TYPE: SYSTEM
#END CONFIG INFO
#
# ´ËmysqlÅäÖÃÎļþÀý×ÓÕë¶Ô4GÄÚ´æ
# Ö÷ҪʹÓÃINNODB
#´¦Àí¸´ÔÓ¶ÓÁв¢ÇÒÁ¬½ÓÊýÁ¿½ÏÉÙµÄmysql·þÎñÆ÷
#
# ½«´ËÎļþ¸´ÖƵ½/etc/my.cnf ×÷Ϊȫ¾ÖÉèÖÃ,
# mysql-data-dir/my.cnf ×÷Ϊ·þÎñÆ÷Ö¸¶¨ÉèÖÃ
# (@localstatedir@ for this installation) »òÕß·ÅÈë
# ~/.my.cnf ×÷ΪÓû§ÉèÖÃ.
#
# ÔÚ´ËÅäÖÃÎļþÖÐ, Äã¿ÉÒÔʹÓÃËùÓгÌÐòÖ§³ÖµÄ³¤Ñ¡Ïî.
# Èç¹ûÏë»ñϤ³ÌÐòÖ§³ÖµÄËùÓÐÑ¡Ïî
# ÇëÔÚ³ÌÐòºó¼ÓÉÏ"--help"²ÎÊýÔËÐгÌÐò.
#
# ¹ØÓÚ¶ÀÁ¢Ñ¡Ïî¸ü¶àµÄϸ½ÚÐÅÏ¢¿ÉÒÔÔÚÊÖ²áÄÚÕÒµ½
#
#
# ÒÔÏÂÑ¡Ïî»á±»MySQL¿Í»§¶ËÓ¦ÓöÁÈ¡.
# ×¢ÒâÖ»ÓÐMySQL¸½´øµÄ¿Í»§¶ËÓ¦ÓóÌÐò±£Ö¤¿ÉÒÔ¶ÁÈ¡Õâ¶ÎÄÚÈÝ.
# Èç¹ûÄãÏëÄã×Ô¼ºµÄMySQLÓ¦ÓóÌÐò»ñÈ¡ÕâЩֵ
# ÐèÒªÔÚMySQL¿Í»§¶Ë¿â³õʼ»¯µÄʱºòÖ¸¶¨ÕâЩѡÏî
#
[client]
#password = [your_password]
port = @MYSQL_TCP_PORT@
socket = @MYSQL_UNIX_ADDR@
# *** Ó¦Óö¨ÖÆÑ¡Ïî ***
#
# MySQL ·þÎñ¶Ë
#
[mysqld]
# Ò»°ãÅäÖÃÑ¡Ïî
port = @MYSQL_TCP_PORT@
socket = @MYSQL_UNIX_ADDR@
# back_log ÊDzÙ×÷ϵͳÔÚ¼àÌý¶ÓÁÐÖÐËùÄܱ£³ÖµÄÁ¬½ÓÊý,
# ¶ÓÁб£´æÁËÔÚMySQLÁ¬½Ó¹ÜÀíÆ÷Ï̴߳¦Àí֮ǰµÄÁ¬½Ó.
# Èç¹ûÄãÓзdz£¸ßµÄÁ¬½ÓÂʲ¢ÇÒ³öÏÖ"connection refused" ±¨´í,
# Äã¾ÍÓ¦¸ÃÔö¼Ó´Ë´¦µÄÖµ.
# ¼ì²éÄãµÄ²Ù×÷ϵͳÎĵµÀ´»ñÈ¡Õâ¸ö±äÁ¿µÄ×î´óÖµ.
# Èç¹û½«back_logÉ趨µ½±ÈÄã²Ù×÷ϵͳÏÞÖƸü¸ßµÄÖµ,½«»áûÓÐЧ¹û
back_log = 50
# ²»ÔÚTCP/IP¶Ë¿ÚÉϽøÐмàÌý.
# Èç¹ûËùÓеĽø³Ì¶¼ÊÇÔÚͬһ̨·þÎñÆ÷Á¬½Óµ½±¾µØµÄmysqld,
# ÕâÑùÉèÖý«ÊÇÔöÇ¿°²È«µÄ·½·¨
# ËùÓÐmysqldµÄÁ¬½Ó¶¼ÊÇͨ¹ýUnix sockets »òÕßÃüÃû¹ÜµÀ½øÐеÄ.
# ×¢ÒâÔÚwindowsÏÂÈç¹ûûÓдò¿ªÃüÃû¹ÜµÀÑ¡Ïî¶øÖ»ÊÇÓôËÏî
# (ͨ¹ý "enable-named-pipe" Ñ¡Ïî) ½«»áµ¼ÖÂmysql·þÎñûÓÐÈκÎ×÷ÓÃ!
#skip-networking
# MySQL ·þÎñËùÔÊÐíµÄͬʱ»á»°ÊýµÄÉÏÏÞ
# ÆäÖÐÒ»¸öÁ¬½Ó½«±»SUPERȨÏÞ±£Áô×÷Ϊ¹ÜÀíÔ±µÇ¼.
# ¼´±ãÒѾ´ïµ½ÁËÁ¬½ÓÊýµÄÉÏÏÞ.
max_connections = 100
# ÿ¸ö¿Í»§¶ËÁ¬½Ó×î´óµÄ´íÎóÔÊÐíÊýÁ¿,Èç¹û´ïµ½ÁË´ËÏÞÖÆ.
# Õâ¸ö¿Í»§¶Ë½«»á±»MySQL·þÎñ×èÖ¹Ö±µ½Ö´ÐÐÁË"FLUSH HOSTS" »òÕß·þÎñÖØÆô
# ·Ç·¨µÄÃÜÂëÒÔ¼°ÆäËûÔÚÁ´½ÓʱµÄ´íÎó»áÔö¼Ó´ËÖµ.
# ²é¿´ "Aborted_connects" ״̬À´»ñÈ¡È«¾Ö¼ÆÊýÆ÷.
max_connect_errors
Ïà¹ØÎĵµ£º
¸Õ¸Õ°²×°Íêmysqlºó
´ÓcmdÖнøÈëmysqlÊý¾Ý¿â
ÃüÁîÐÐÖÐÊäÈ룺
mysql -uroot -p123
½øÈëmysqlÊý¾Ý¿âÖÐ
ÃüÁîÐÐÖÐÊäÈë:
status;
²é¿´µ±Ç°Êý¾Ý¿âÖеıàÂë
ÈçÏ£º
--------------
mysql Ver 14.12 Distrib 5.1.7-beta, for Win32 (ia32)
Connection id: &nb ......
×÷Õߣº°½Ê¿Î°
·þÎñÆ÷£ºIBM X346
CPU:Intel Xeon 3.0 *4
Äڴ棺2GB
Ó²ÅÌ£ºRAID5
OS£ºwin2003 SE
Ò»¡¢MySQL 5.5 M2
MySQL ĬÈÏÒýÇæInnoDB£¬ÓÅ»¯Ç°ºó¼¸ºõÎÞ²î±ð
¶þ¡¢SQL SERVER 2000 SE
´ÓÕâû´Î²âÊÔ¿´£¬MysqlÔÚÊÂÎñÐÔÄܱíÏÖ²»ÈçSQL SERVER¡£Í¬Ê±£¬Á½ÕßÔÚĬÈÏÇé¿ö£¬ÅúÁ¿Insert£¬Mysql±íÏ ......
MySQLÖеÄÊý¾ÝÓø÷ÖÖ²»Í¬µÄ¼¼Êõ´æ´¢ÔÚÎļþ(»òÕßÄÚ´æ)ÖС£ÕâЩ¼¼ÊõÖеÄÿһÖÖ¼¼Êõ¶¼Ê¹Óò»Í¬µÄ´æ´¢»úÖÆ¡¢Ë÷Òý¼¼ÇÉ¡¢Ëø¶¨Ë®Æ½²¢ÇÒ×îÖÕÌṩ¹ã·ºµÄ²»Í¬µÄ¹¦ÄܺÍÄÜÁ¦¡£Í¨¹ýÑ¡Ôñ²»Í¬µÄ¼¼Êõ£¬ÄãÄܹ»»ñµÃ¶îÍâµÄËٶȻòÕß¹¦ÄÜ£¬´Ó¶ø¸ÄÉÆÄãµÄÓ¦ÓõÄÕûÌ幦ÄÜ¡£
ÀýÈ磬Èç¹ûÄãÔÚÑо¿´óÁ¿µÄÁÙʱÊý¾Ý£¬ÄãÒ²ÐíÐèҪʹÓÃÄÚ´æ´æ´¢ÒýÇæ¡£ÄÚ´æ´æ´ ......
²éѯ¼°É¾³ýÖظ´¼Ç¼µÄ·½·¨
(Ò»)
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´Åжϣ¬Ö»Á ......
×î½ü×öÒ»¸öСÏîÄ¿£¬¸ÕºÃÓöµ½Õâ¸öÎÊÌ⣬ûʲôʱ¼äÈ¥½â¾öÕâ¸öÎÊÌ⣬´ó¸ÅÔÚÍøÉÏÕÒÁËһϣ¬Ëµ¸ÄʵÀýÃû£¬¸Ä×¢²á±í£¬ÏȲ»ÊǺܸҸģ¬±Ï¾¹¶Ô×¢²á±íÒ»Ö±¾õµÃÊǸö´óÉñ£¬²»¸ÒËæ±ã¶¯£¬½ñ¶ùÊÇ»í³öÈ¥ÁË£¬¾ÍÔÚ×¢²á±íÖвéÕÒËùÓдúmysql×ÖÑùµÄÐÅϢȫ²¿É¾³ý£¬×îºó¾¹È»³ÉÁË£¬µ±È»Ð¶Ôغóɾ³ý֮ǰËùÓеÄÏà¹ØÐÅÏ¢£¬°²×°ÎļþÄ¿ ......