Ìí¼Ó/ɾ³ýMySQLÊý¾Ý¿â±íÖеÄ×Ö¶Î
Ìí¼Ó×ֶεĸñʽ
ALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name alter_specification [, alter_specification] ...alter_specification: table_option ... | ADD [COLUMN] col_name column_definition [FIRST | AFTER col_name ]
eg.
ALTER TABLE myTbl ADD COLUMN newItem VARCHAR(20) DEFAULT "0" AFTER oldItem;
ɾ³ý×ֶεĸñʽ
ALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name alter_specification [, alter_specification] ...alter_specification: table_option ... | DROP [COLUMN] col_name
eg.
ALTER TABLE myTbl DROP COLUMN uselessItem;
Ïà¹ØÎĵµ£º
MYSQL 8Сʱ ¶Ï¿ªÁ´½ÓÎÊÌâ
½â¾ö°ì·¨ÓÐÁ½¸ö£ºµÚÒ»ÊÇÉèÖÃautoReconnectÊôÐÔÉèÖÃΪtrue£»µÚ¶þÊÇÉèÖÃDBCP ʱ½«testqueryµÈ¼¸¸öÊôÐÔÒ»²¢ÉèÖá£
ÎÊÌâµÄÔÒòÊÇ£¬MySQLµÄ²ÎÊýinteractive_timeout£¬Ò²¾ÍÊǽ»»¥³¬Ê±Ê±¼äĬÈÏΪ8Сʱ¡£Ò²¾ÍÊÇÈç¹ûÒ»¸öÁ´½ÓÔÚ8Сʱºó£¬»¹Ã»ÓкͷþÎñÆ÷½»»¥£¬Õâ¸öÁ¬½Ó¾Í»á±»MySQL·þÎñÆ÷¶Ï¿ª¡£ÒòΪMySQLÄÜ ......
ÓÉMySQLÌṩµÄģʽƥÅäµÄÆäËûÀàÐÍÊÇʹÓÃÀ©Õ¹ÕýÔò±í´ïʽ¡£µ±Äã¶ÔÕâÀàģʽ½øÐÐÆ¥Åä²âÊÔʱ£¬Ê¹ÓÃREGEXPºÍNOT REGEXP²Ù×÷·û(»òRLIKEºÍNOT RLIKE£¬ËüÃÇÊÇͬÒå´Ê)¡£ À©Õ¹ÕýÔò±í´ïʽµÄһЩ×Ö·ûÊÇ£º
“.”Æ¥ÅäÈκε¥¸öµÄ×Ö·û¡£
Ò»¸ö×Ö·ûÀà“[...]”Æ¥ÅäÔÚ·½À¨ºÅÄÚµÄÈκÎ×Ö·û¡£ÀýÈ磬“[abc]”ƥŠ......
Ê×ÏÈ£¬ÒªÏÂÔØÒ»¸öÁ¬½ÓmysqlÊý¾Ý¿âµÄÇý¶¯³ÌÐò: mysql-connector-java-3.0.15-ga-bin.jar, Õâ¸öÇý¶¯³ÌÐò²»ÐèÒª×öÆäËüÅäÖÃ,Ò²¾ÍÊÇ˵£¬¶ÔÓÚmysqlÊý¾Ý¿â£¬²»±ØÏñaccess»òÕßoracleÒª½¨Á¢odbcÊý¾ÝÔ´¡£
Æä´Î£¬½«ÉÏÃæµÄ.jarÎļþ¼ÓÈëµ½classpath»·¾³±äÁ¿ÖС£
×îºó£¬¾ÍÊÇд´úÂë½øÐвâÊÔÁË¡£
Ö÷Òª´úÂëÈçÏ£º
......
ÐÞ¸ÄMySQL 5.1 dataÎļþ¼Ð·¾¶
ÎÒ°²×°µÄÕâ¸ö°æ±¾µÄMYSQLûÓÐdataÎļþ¼Ð£¬µ«ÊÇ¿ÉÒÔÕý³£Ê¹Ó㬲»ÖªµÀÄãÃǵÄÓÐûÓÐÄØ£¿Ôõô²Å¿ÉÒÔ³öÏÖdataÎļþ¼ÐÄØ£¬Ã»ÓÐdataÎļþ¼Ð£¬ÄÇÎÒµÄÊý¾Ý¿âÎļþ´æ·ÅÔÚʲôµØ·½ÁËÄØ£¿ÎÒËÑË÷ÁËÕû¸öµçÄÔ¶¼Ã»ÓÐÕÒµ½¡£
ºÃÐĵÄÅóÓÑ£¬¿ì¸æËßÎÒÔõô»ØÊ£¿¸ÃÔõô½â¾ö£¿
ллÁË£¡£¡£¡
====================== ......
mysqlµÄÅäÖÃÎļþͨ³£ÃüÃûΪmy.cnf,Èç¹û±£´æÔÚĬÈϵÄ/etc/my.cnfĿ¼ÏÂ,ÄÇôÕâÀïÃæµÄÅäÖÃÊÇÈ«¾ÖµÄ,¼È¶Ô´Ë·þÎñÆ÷ÉϵÄËùÓÐmysql·þÎñÆ÷¶¼ÊÇÓÐЧµÄ(Èç¹ûÄãÓÐÔÚЩ·þÎñÆ÷ÉÏ°²×°Á˶à¸ömysql).Èç¹ûÖ»ÊDZ£´æÔÚij¸ömysql·þÎñÆ÷µÄÊý¾ÝĿ¼ÏÂ,ÔòÖ»¶Ô¸Ãmysql·þÎñÆ÷²úÉú×÷ÓÃ.Èç¹ûÊDZ£´æÔÚij¸öÓû§(µ±È»ÊÇmysqlÓû§)µÄhomeĿ¼ÏÂ,ÔòÖ»ÊÇÔÚmy ......