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

½â¾ömySQLÕ¼ÓÃÄڴ泬´óÎÊÌâ

½â¾ömySQLÕ¼ÓÃÄڴ泬´óÎÊÌâ
ΪÁË×°mysql»·¾³²âÊÔ£¬×°ÉϺó·¢ÏÖÆô¶¯ºómysqlÕ¼ÓÃÁ˺ܴóµÄÐéÄâÄڴ棬´ï8°Ù¶àÕס£ÍøÉÏËÑË÷ÁËһϣ¬µÃµ½¸ßÈËÖ¸µãmy.ini¡£ÔÙҲû¼ûÔÙÏêϸµÄÁË..Ö»ºÃ´ò¿ªmy.iniÖðÐеĿУ¬ËäȻӢÎIJîÁ˵㣬²»¹ý¶àÉÙM»¹ÊÇ¿´µÃÃ÷µÄ^-^
 
¸ü¸ÄºóÈçÏ£º
innodb_buffer_pool_size=576M ->256M InnoDBÒýÇ滺³åÇøÕ¼ÁË´óÍ·£¬Ê×Òª¾ÍÊÇÄÃËü¿ªµ¶
query_cache_size=100M          ->16M ²éѯ»º´æ
tmp_table_size=102M                ->64M ÁÙʱ±í´óС
key_buffer_size=256m                ->32M
 
ÖØÆômysql·þÎñºó£¬ÐéÄâÄÚ´æ½µµ½200ÒÔÏ£®
 
ÁíÍâmysql°²×°Ä¿Â¼ÏÂÓм¸¸öÎļþ£ºmy-huge.ini ¡¢my-large.ini¡¢my-medium.ini...Õ⼸¸öÊǸù¾ÝÄÚ´æ´óС×÷µÄ½¨ÒéÅäÖã¬ÐÂÊÖÔÚÉèÖõÄʱºòÒ²¿ÉÒԲο¼Ò»Ï¡£
 
2GÄÚ´æµÄMYSQLÊý¾Ý¿â·þÎñÆ÷ my.iniÓÅ»¯ (my.ini)
 
2GÄÚ´æ,Õë¶ÔÕ¾ÉÙ,ÓÅÖÊÐ͵ÄÉèÖÃ,ÊÔÑéÌØ£º
 
table_cache=1024 ÎïÀíÄÚ´æÔ½´ó,ÉèÖþÍÔ½´ó.ĬÈÏΪ2402,µ÷µ½512-1024×î¼Ñ
innodb_additional_mem_pool_size=8M   ĬÈÏΪ2M
innodb_flush_log_at_trx_commit=0 µÈµ½innodb_log_buffer_sizeÁжÓÂúºóÔÙͳһ´¢´æ,ĬÈÏΪ1
innodb_log_buffer_size=4M          ĬÈÏΪ1M
innodb_thread_concurrency=8       ÄãµÄ·þÎñÆ÷CPUÓм¸¸ö¾ÍÉèÖÃΪ¼¸,ĬÈÏΪ8
key_buffer_size=256M                   ĬÈÏΪ218       µ÷µ½128×î¼Ñ
tmp_table_size=64M                   ĬÈÏΪ16M        µ÷µ½64-256×î¹Ò
read_buffer_size=4M                   ĬÈÏΪ64K
read_rnd_buffer_size=16M          ĬÈÏΪ


Ïà¹ØÎĵµ£º

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ
ÎÄÕ·ÖÀà:Êý¾Ý¿â
ÔÚÊý¾Ý¿â±í¶ªÊ§»òË𻵵ÄÇé¿öÏ£¬±¸·ÝÄãµÄÊý¾Ý¿âÊǺÜÖØÒªµÄ¡£Èç¹û·¢Éúϵͳ±ÀÀ££¬Äã¿Ï¶¨ÏëÄܹ»½«ÄãµÄ±í¾¡¿ÉÄܶªÊ§×îÉÙµÄÊý¾Ý»Ö¸´µ½±ÀÀ£·¢ÉúʱµÄ״̬¡£±¾ÎÄÖ÷Òª¶ÔMyISAM±í×ö±¸·Ý»Ö¸´¡£
 
±¸·Ý²ßÂÔÒ»£ºÖ±½Ó¿½±´Êý¾Ý¿âÎļþ£¨²»ÍƼö£©
±¸·Ý²ßÂÔ¶þ£ºÊ¹ÓÃmysqlhotcopy±¸·ÝÊý¾Ý¿â£ ......

MySQLÓû§Ìí¼ÓºÍ·ÖÅäȨÏÞ

mysql> grant ȨÏÞ1,ȨÏÞ2,¡­È¨ÏÞn on Êý¾Ý¿âÃû³Æ.±íÃû³Æ to Óû§Ãû@Óû§µØÖ· identified by ¡®Á¬½Ó¿ÚÁ; ȨÏÞ1,ȨÏÞ2,¡­È¨ÏÞn´ú±íselect,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,fileµÈ14¸öȨÏÞ¡£µ±È¨ÏÞ1,ȨÏÞ2,¡­È¨ÏÞn±»all privileges»òÕßall´úÌ棬±íʾ¸³ÓèÓû§È«²¿ ......

OracleÓëMySQLÖС°¿É´®Ðл¯¡±µÄ¶Ô±È²âÊÔ

OracleÓëMySQLÖГ¿É´®Ðл¯”µÄ¶Ô±È²âÊÔ
      Thomas Kyte ÔÚ“Oracle 9i&10g±à³ÌÒÕÊõ”Ò»ÊéÖÐΪÁË˵Ã÷ÊÂÎñµÄ¸ôÀ뼶±ð£¬ÌṩÁËһЩÀý×Ó¡£ÕâÀïÎÒÃÇÀ´¿´¿´“¿É´®Ðл¯”¼¶±ðϵıíÏÖ¡£
ÒÔÆÕͨÓû§µÇ¼ϵͳ£¬²¢´´½¨²âÊÔÓÃµÄ±í¡£
idle> connect scott/tiger ......

mysql ³£¼û´íÎ󼯺Ï


 
1£º Can’t connect to [local] MySQL server´íÎó
Ò»¸öMySQL¿Í»§¿ÉÒÔÁ½ÖÖ²»Í¬µÄ·½Ê½Á¬½Ómysqld·þÎñÆ÷£ºUnixÌ×½Ó×Ö£¬Ëüͨ¹ýÔÚÎļþϵͳÖеÄÒ»¸öÎļþ(ȱʡ“/tmp /mysqld.sock”)½øÐÐÁ¬½Ó£»»òTCP/IP£¬Ëüͨ¹ýÒ»¸ö¶Ë¿ÚºÅÁ¬½Ó¡£UnixÌ×½Ó×Ö±ÈTCP/IP¸ü¿ì£¬µ«ÊÇÖ»ÓÐÓÃÔÚÁ¬½Óͬһ̨¼ÆËã»úÉϵķþÎñÆ÷¡£Èç¹ûÄ ......

hibernate+mysql Á¬½Ó³¬Ê±½â¾ö°ì·¨Ò»£¬£¨ÍøÉÏÕҵģ©


½â¾öhibernate+mysql³öÏֵĸôÌìÁ¬½Ó³¬Ê±ÎÊÌâ
³öÏÖ´íÎó£ºSQL Error: 0, SQLState: 08S01
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketExcepti ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ