1. ½â¾ömysql±¨too many connectionsÒì³£
ÐÞ¸ÄMYSQL×î´óÁ¬½ÓÊý:
vi /etc/my.cnf
[mysqld]
max_connections=1000 #¼ÓÈëÕâЩÄÚÈÝ
ÓÃmysql>show variables;
»á¿´µ½max_connections ¡£
2. ½â¾ömysql¸ß²¢·¢Ï¼õÉÙ±¨ËÀËøÒì³£
MyISAMºÍInnoDB´æ´¢ÒýÇæÐÔÄܲî±ð²¢²»ÊǺܴó£¬Õë¶ÔInnoDBÀ´Ëµ£¬Ó°ÏìÐÔÄܵÄÖ÷ÒªÊÇ
innodb_flush_log_at_trx_commit Õâ¸öÑ¡ÏÈç¹ûÉèÖÃΪ1µÄ»°£¬ÄÇôÿ´Î²åÈëÊý¾ÝµÄʱºò¶¼»á×Ô¶¯Ìá½»£¬µ¼ÖÂÐÔÄܼ±¾çϽµ£¬
Ó¦¸ÃÊǸúË¢ÐÂÈÕÖ¾ÓйØÏµ£¬ÉèÖÃΪ0ЧÂÊÄܹ»¿´µ½Ã÷ÏÔÌáÉý£¬µ±È»£¬Í¬ÑùÄã¿ÉÒÔSQLÖÐÌá½»“SET AUTOCOMMIT = 0”À´ÉèÖôﵽºÃµÄÐÔÄÜ¡£
ÁíÍ⣬»¹Í¨¹ýÉèÖÃinnodb_buffer_pool_sizeÄܹ»ÌáÉýInnoDBµÄÐÔÄÜ¡£
innodb_buffer_pool_size£ºÕâÊÇInnoDB×îÖØÒªµÄÉèÖ㬶ÔInnoDBÐÔÄÜÓоö¶¨ÐÔµÄÓ°Ï졣ĬÈϵÄÉèÖÃÖ»ÓÐ8M£¬
ËùÒÔĬÈϵÄÊý¾Ý¿âÉèÖÃÏÂÃæInnoDBÐÔÄܺܲÔÚÖ»ÓÐInnoDB´æ´¢ÒýÇæµÄÊý¾Ý¿â·þÎñÆ÷ÉÏÃæ£¬¿ÉÒÔÉèÖÃ60-80%µÄÄÚ´æ¡£
¸ü¾«È·Ò»µã£¬ÔÚÄÚ´æÈÝÁ¿ÔÊÐíµÄÇé¿öÏÂÃæÉèÖñÈInnoDB tablespaces´ó10%µÄÄÚ´æ´óС¡£
innodb_flush_logs_at_trx_commit=2£º ¸Ã²ÎÊýÉ趨ÁËÊÂÎñÌύʱÄÚ´æÖÐlogÐÅÏ¢µÄ´¦Àí¡£
1) =1ʱ£¬ÔÚÿ ......
mysqlÃüÁ½õ[¾ø¶Ô¾«»ª]
²âÊÔ»·¾³£ºmysql 5.0.45
¡¾×¢£º¿ÉÒÔÔÚmysqlÖÐͨ¹ýmysql> SELECT VERSION();À´²é¿´Êý¾Ý¿â°æ±¾¡¿
ÕûÀí£ºleo
Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§Ãûǰ¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëǰ±ØÐëûÓпոñ£¬·ñÔòÈÃÄãÖØÐÂÊäÈëÃÜÂë.
Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£º mysql>
2¡¢Á¬½Óµ½Ô¶³ÌÖ÷»úÉϵÄMYSQL¡£¼ÙÉèÔ¶³ÌÖ÷»úµÄIPΪ£º110.110.110.110£¬Óû§ÃûΪroot,ÃÜÂëΪabcd123¡£Ôò¼üÈëÒÔÏÂÃüÁ
mysql -h110.110.110.110 -u root -p 123;£¨×¢:uÓërootÖ®¼ä¿ÉÒÔ²»Óüӿոñ£¬ÆäËüÒ²Ò»Ñù;ͨ¹ý¶Ë¿ÚºÍIP¹ÜÀí²»Í¬¶Ë¿ÚµÄ¶à¸öMySQLmysql>mysql -u root -p -P 3306 -h 127.0.0.1£©
3¡¢Í˳öMYSQLÃüÁ exit £¨»Ø³µ£©
¶þ¡¢ÐÞ¸ÄÃÜÂë¡£
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
1¡¢¸øroot¼Ó¸öÃÜÂëab12¡£Ê×ÏÈÔÚDOSϽøÈëĿ¼mysql\bin£¬È»ºó¼üÈëÒÔÏÂÃüÁî
mysqladmin -u root -password ab12
×¢£ºÒòΪ¿ªÊ¼Ê±root ......
ʹÓÃÈí¼þ£ºMySQLMigrationTool ǰÌáÒª°²×°JRE...²Å»á³öÏÖÏÂÃæµÄ½çÃæ. ÔËÐÐÈí¼þºó£¬µãNEXT½øÈëÒÔϽçÃæ£º Ñ¡ÔñMS SQL SERVER£¬°´ÌáʾÌîд£¬Connection StringΪ£º jdbc:jtds:sqlserver://IPµØÖ·:¶Ë¿Ú(ĬÈÏ1433)/Êý¾Ý¿âÃû;user=Óû§Ãû;password=ÃÜÂë;charset=gb2312;domain=
ÏÂÒ»²½ÎªMySQLµÄÐÅÏ¢£¬Connection StringΪ£º
jdbc:mysql://IPµØÖ·:¶Ë¿Ú(ĬÈÏ3306)/?user=Óû§Ãû&password=ÃÜÂë&useServerPrepStmts=false&
characterEncoding=UTF-8
Ö®ºóһ·°´Ìáʾ½øÐС£µ½´Ë½çÃæÑ¡ÔñÒªºöÂÔµÄ±í¡£
¼ÌÐøNEXT£¬ÈçͼËùʾ½øÈë´Ë½çÃæ£¬´Ë´¦É趨×Ö·û±àÂ룬·Ç³£¹Ø¼ü¡£
ÈçͼËùʾ£¬Migration of type MSSQL Schema´¦Ñ¡ÔñMutilanguage£¬Migration of type MSSQLTable´¦Ñ¡ÔñData consistency / multilanguage¡£
½ÓÏÂÀ´Ò»Â·NEXT¼´¿É¸ã¶¨¡£
ÒÔÏÂÊÇÎÒÓöµ½µÄÎÊÌâÓë½â¾ö°ì·¨£º
ÌáʾÊý¾Ý¹ý´ó£¬ÎÞ·¨µ¼Èë¡£ÐÞ¸Ämy.cnfÎļþµÄmax_allowed_packet = 100MÒÔÉÏ¡£ÔÚwindows²Ù×÷ϵͳÖУ¬my.cnfÓпÉÄÜÏÔʾ²»³öÀ´£¬ÐèÒªÓÃ±à¼Æ÷Ö±½ÓÊäÈëµØÖ·£ºÅÌ·û:\\Ŀ¼\mysql\bin\my.cnf´ò¿ª¡£
¡°there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON U ......
shell½Å±¾Ñ§Ï°±Ê¼Ç£¨Èý£©
££££££mysqlÓëARP±íµÄ°ó¶¨Ô´Âë
Õâ¸ö³ÌÐòÖгýÁËÓÐshell½Å±¾£¬»¹Óõ½ÁËmysqlÅú´¦Àí½Å±¾
Ö÷ҪʵÏÖÓÃmysql¶ÔARP±íµÄ¸üÐÂ
shell½Å±¾£º
#!/bin/bash
#create IP-MAC items in database and add some IP-MAC items in the
ARP table
#First cheek if there is a database
DataBasePath='/var/lib/mysql' #the path is where
the mysql store the databse
dataPath='/var/lib/mysql/Data'
#where mysql place the database
homePath='/home/shiyan/mysql'
#normal place to put the data
state='' #hold for state,1 for err state,0 for
correct state
##################################function#######################################
#update the ARP table with the database
updateARP(){
sudo chmod 777 $dataPath
sudo cp $dataPath/data.txt $homePath/
cd $homePath
Line=`wc -l data.txt|awk '{printf $1}'`
  ......
½â¾öMySqlÖÐÎÄÂÒÂëÎÊÌâ
»·¾³½éÉÜ£º
Êý¾Ý¿â£ºMySql5.1
¿ª·¢ÓïÑÔ£ºJAVA
²Ù×÷ϵͳ£ºWindows Xp
´íÎó¼°½â¾ö²½Öè¼Ç¼£º
ºÃ¾ÃûÓÐÓÃMySqlÁË£¬ÕâÁ½ÌìÓÃһϱ¨ÖÐÎIJåÈëÎÊÌ⣬¸Õ¿ªÊ¼µÄÒ»Ö±ÒÔΪÊÇMySqlÁ¬½Ó×Ö·û´®µÄÎÊÌ⣺
jdbc:mysql://localhost:3306/imps?useUnicode=true&characterEncoding=UTF-8
½«×îºóµÄ²ÎÊýcharacterEncodingµÄÖµÊÇ»»ÁËÓÖ»»£¬Èçgbk¡¢gb2312µÈµÈ£¬½á¹ûͨ¹ýÒ³Ãæ²åÈëµÄʱºò»¹ÊDZ¨´í£¬ÎÒJSPÒ³Ãæ²ÉÓõıàÂ뷽ʽΪ£º
<%@ page contentType="text/html;charset=UTF-8" %>
ÎÒͨ¹ýMySql Client½øÐÐÖÐÎIJåÈëµÄʱºò£¬Ã»ÓÐÎÊÌ⣬¿ÉÒÔÕý³£²åÈ룬ÎÒÓÖ°²×°ÁËMySqlµÄGUI¹¤¾ß£¬´ò¿ªÆä²éѯ¹¤¾ß½øÐÐÖÐÎĵIJåÈ룬±¨µÄ´í¾ÓÈ»ºÍÎÒͨ¹ýJSPÒ³Ãæ²åÈëµÄʱºò±¨µÄ´íÒ»Ñù£¬¶¼ÊDz»ÔÊÐí²åÈëÒ»¶Ñʲô×Ö·ûµÈ£¬Õâ¸öʱºòÎÒÏëÊDz»ÊÇÊý¾Ý¿âµÄ×Ö·ûÉèÖÃÓÐÎÊÌ⣬ÎÒͨ¹ýÃüÁ
Help show;
ÔÚÄÇÀïÊÔÊÔ£¬ÎÒ³¢ÊÔÁËÕâÑùÒ»ÌõÃüÁ
Show create table test
ÏÔʾ¸Ã±íĬÈϵÄ×Ö·ûΪlatinlÓïÑÔ£º
mysql> show create table test;
+-------+------------------------------------------
------------------------- ......
1. DEDE £ÕâÊÇÒ»¿î¹úÄÚ¿ªÔ´µÄcms£¬×÷ÕßÊÇÒ»¸ö¸öÈË£¬ÄÜ×ö³öÈç´Ë¹¦ÄܵÄcms£¬ÊÇÏ൱²»´íµÄ¡£2007°æ¹¦ÄÜÊ®·ÖÇ¿´ó£¬Ï£ÍûÄܸÄÉÆÖ®Ç°Êý¾ÝÁ¿Ò»´ó£¬¸üо²Ì¬Ò³¾ÍºÜÂýµÄȱµã¡£ÒòΪ¿ªÔ´£¬Óн϶àµÄÍæ¼ÒºÍÓµ»¤Õß¡£·Ç³£ÊʺÏÓÐÒ»¶¨±à³Ì»ù´¡µÄÕ¾³¤¡£
¹Ù·½£ºhttp://www.dedecms.com
2. phpcms£Ò»¸ö×ۺϵÄÍøÕ¾¹ÜÀíϵͳ£¬ÓÉPHP+MYSQL¹¹¼ÜȫվÉú³Éhtml£¬Äܹ»¿ìËÙ¸ßЧµØÓ¦ÓÃÓÚLINUXºÍWINDOWS·þÎñÆ÷ƽ̨£¬ÊÇĿǰÖйúLINUX»·¾³ÏÂ×î¼ÑµÄÍøÕ¾¹ÜÀíÓ¦Óýâ¾ö·½°¸Ö®Ò»¡£¾Ý´«±»¿á6ÊÕ¹º¡£
¹Ù·½£ºhttp://www.phpcms.cn
3. µÛ¹úÍøÕ¾¹ÜÀíϵͳ£EcmsÈ«³ÆÎª£¢µÛ¹úÍøÕ¾¹ÜÀíϵͳ£¢£¬Ó¢ÎÄÒëΪ£¢Empire CMS£¢¼ò³Æ£¢Ecms£¢.EcmsÊÇ»ùÓÚB/S½á¹¹£¬ÇÒ¹¦ÄÜÇ¿´ó¶øÒ×ÓõÄÍøÕ¾¹ÜÀíϵͳ£®ÊÇÒ»¸ö¾¹ýÍêÉÆÉè¼ÆµÄÊÊÓÃÓÚLinux/windows/UnixµÈ»·¾³Ï¸ßЧµÄÍøÕ¾½â¾ö·½°¸¡£
¹Ù·½£ºhttp://www.phome.net
4. php168 £PHP168Õûվϵͳ£¬´úÂëÈ«²¿¿ªÔ´£¬¿É·½±ãµÄ½øÐжþ´Î¿ª·¢£¬¹¦ÄÜÄ£¿é¿ÉÒÔ×ÔÓɰ²×°Óëɾ³ý£¬¸öÈËÓû§Ãâ·ÑʹÓá£ÏµÍ³ÆµµÀÄ£¿éºÜ¶à£¬ÊʺÏ×÷¸öÈËÃÅ»§ÍøÕ¾¡£½Ï¶àÒ³ÃæÃ»ÓÐÉú³É¾²Ì¬Ò³¡£Èç¹ûÄãÏ뽨վ£¬¾ÍÒåÎÞ·´¹ËµÄÑ¡ÔñËü°É£¡£¡£¡
¹Ù·½£ºhttp://www.php168.com
5. HBcms £ºÒ»¸öÒ ......
1. DEDE £ÕâÊÇÒ»¿î¹úÄÚ¿ªÔ´µÄcms£¬×÷ÕßÊÇÒ»¸ö¸öÈË£¬ÄÜ×ö³öÈç´Ë¹¦ÄܵÄcms£¬ÊÇÏ൱²»´íµÄ¡£2007°æ¹¦ÄÜÊ®·ÖÇ¿´ó£¬Ï£ÍûÄܸÄÉÆÖ®Ç°Êý¾ÝÁ¿Ò»´ó£¬¸üо²Ì¬Ò³¾ÍºÜÂýµÄȱµã¡£ÒòΪ¿ªÔ´£¬Óн϶àµÄÍæ¼ÒºÍÓµ»¤Õß¡£·Ç³£ÊʺÏÓÐÒ»¶¨±à³Ì»ù´¡µÄÕ¾³¤¡£
¹Ù·½£ºhttp://www.dedecms.com
2. phpcms£Ò»¸ö×ۺϵÄÍøÕ¾¹ÜÀíϵͳ£¬ÓÉPHP+MYSQL¹¹¼ÜȫվÉú³Éhtml£¬Äܹ»¿ìËÙ¸ßЧµØÓ¦ÓÃÓÚLINUXºÍWINDOWS·þÎñÆ÷ƽ̨£¬ÊÇĿǰÖйúLINUX»·¾³ÏÂ×î¼ÑµÄÍøÕ¾¹ÜÀíÓ¦Óýâ¾ö·½°¸Ö®Ò»¡£¾Ý´«±»¿á6ÊÕ¹º¡£
¹Ù·½£ºhttp://www.phpcms.cn
3. µÛ¹úÍøÕ¾¹ÜÀíϵͳ£EcmsÈ«³ÆÎª£¢µÛ¹úÍøÕ¾¹ÜÀíϵͳ£¢£¬Ó¢ÎÄÒëΪ£¢Empire CMS£¢¼ò³Æ£¢Ecms£¢.EcmsÊÇ»ùÓÚB/S½á¹¹£¬ÇÒ¹¦ÄÜÇ¿´ó¶øÒ×ÓõÄÍøÕ¾¹ÜÀíϵͳ£®ÊÇÒ»¸ö¾¹ýÍêÉÆÉè¼ÆµÄÊÊÓÃÓÚLinux/windows/UnixµÈ»·¾³Ï¸ßЧµÄÍøÕ¾½â¾ö·½°¸¡£
¹Ù·½£ºhttp://www.phome.net
4. php168 £PHP168Õûվϵͳ£¬´úÂëÈ«²¿¿ªÔ´£¬¿É·½±ãµÄ½øÐжþ´Î¿ª·¢£¬¹¦ÄÜÄ£¿é¿ÉÒÔ×ÔÓɰ²×°Óëɾ³ý£¬¸öÈËÓû§Ãâ·ÑʹÓá£ÏµÍ³ÆµµÀÄ£¿éºÜ¶à£¬ÊʺÏ×÷¸öÈËÃÅ»§ÍøÕ¾¡£½Ï¶àÒ³ÃæÃ»ÓÐÉú³É¾²Ì¬Ò³¡£Èç¹ûÄãÏ뽨վ£¬¾ÍÒåÎÞ·´¹ËµÄÑ¡ÔñËü°É£¡£¡£¡
¹Ù·½£ºhttp://www.php168.com
5. HBcms £ºÒ»¸öÒ ......