MySQL ¹ØÓÚ½¨Á¢Íâ¼üʧ°ÜµÄÎÊÌâ
½ñÌ죬ÓÃNavicatΪÁ½ÕÅ±í½¨Á¢Í⽡¹Øϵ£¬×ÜÊÇÌáʾ´´½¨Ê§°ÜÐÅÏ¢£¬·¢ÏÖÊÇÁ½Õűí¹ØÁªµÄ×Ö¶ÎÀàÐÍÎÊÌ⣬µ«Á½¸ö×ֶζ¼ÊÇintÐÍÁ¨£¬Ôõô»á»¹»áÀàÐͲ»Ò»ÖÂÄØ£¬×îºó·¢ÏÖµ½Ò»¸öµØ·½Óе㲻һÑù£¬¾ÍÊÇÔÚ“Éè¼Æ±í”½çÃæÏ·½Óиö“ÎÞ·ûºÅ”µÄ¸´Ñ¡¿ò£¬Á½ÕűíµÄÖ÷¼ü×Ö¶ÎÆäÖÐÒ»¸öû¹´Ñ¡ÉÏÕâ¸ö¸´Ñ¡¿ò¶øµ¼ÖÂËäÈ»¶¼ÊÇintÀàÐÍ£¬µ«Ò»¸öÊÇÎÞ·ûºÅÕûÐΣ¬Ò»¸ö²»ÊÇ¡£
Ïà¹ØÎĵµ£º
È¡µÃÎÄÕ¹ؼü×ÖΪkeywords
±ínewsµÄ¹Ø¼ü×Ö×Ö¶ÎΪkeyword
keywords=keywords.replace(',','|');
String sql="SELECT * from news WHERE keyword REGEXP '"+keywords+"' ORDER BY id ";
ÓÉÓÚijЩÔÒò£¬ÓÐʱºòÎÒÃÇûÓа´ÕÕ·¶Ê½µÄÉè¼Æ×¼Ôò¶ø°ÑһЩÊôÐԷŵ½Í¬Ò»¸ö×Ö·û´®×Ö¶ÎÖС£±ÈÈç¸öÈËÐËȤ£¬ÓÐʱºòÎÒÃÇÉè¼Æ±íΪ
cr ......
1¡¢½¨Á¢ÁËÒ»¸öj2eeÏîÄ¿¡£
2¡¢½«mysqlµÄjdbcÇý¶¯¿½±´µ½WebContent / WEB-INF/ lib Ŀ¼Ï¡£
3¡¢ÔÚÇý¶¯jar°üÉϵãÓÒ¼ü½«jar°üÌí¼Óµ½¹¹½¨Â·¾¶ÖС£
4¡¢È»ºó±àдÓëÊý¾Ý¿âÏà¹ØµÄ´úÂë¡£
5¡¢ÔÚʵÏÖÀàÖÐÌí¼Ómain·½·¨½øÐе¥Ôª²âÊÔ£¬¸÷¸ö·½·¨¶¼ÄÜÕý³£ÔËÐС£
6¡¢´´½¨jspÒ³ÃæÔÚÆäÖд´½¨¶ÔÏóµ÷Óòéѯ·½·¨¡£²úÉú´íÎó¡£
cn.guopeng.bbs ......
MySQL³£ÓõĴ洢ÒýÇæΪMyISAM¡¢InnoDB¡¢MEMORY¡¢MERGE£¬ÆäÖÐInnoDBÌṩÊÂÎñ°²È«±í£¬ÆäËû´æ´¢ÒýÇ涼ÊÇ·ÇÊÂÎñ°²È«±í¡£
MyISAMÊÇMySQLµÄĬÈÏ´æ´¢ÒýÇæ¡£MyISAM²»Ö§³ÖÊÂÎñ¡¢Ò²²»Ö§³ÖÍâ¼ü£¬µ«Æä·ÃÎÊËٶȿ죬¶ÔÊÂÎñÍêÕûÐÔûÓÐÒªÇó¡£
InnoDB´æ´¢ÒýÇæÌṩÁ˾ßÓÐÌá½»¡¢»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«¡£µ«ÊDZÈÆðMyISAM´æ´ ......
³£¼ûµÄMySQLÃüÁî´óÈ«
Ò»¡¢Á¬½ÓMySQL
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql ......
MysqlÔÚĬÈÏÇé¿öϽ¨Á¢±íµÄ×Ö·û±àÂëÊÇlatin1£¬ËùÒÔÔÚ²åÈëÖÐÎÄʱ»á³ö´í¡£
eg£º
1¡¢²é¿´±í½¨Á¢µÄsqlÔ´Â룺
1: sqlÃüÁshow create table users
2:
3: ½á¹û£º
4: CREATE TABLE `users` (
5: `userID` int(10) unsigned NOT NULL AUTO_INCREMENT,
6: `userName` varchar(4 ......