Mysql±¸·Ý»¹ÔµÄÒ»¸öbug
´Ómysql±¸·Ý³öÀ´µÄsqlÎļþ½øÐл¹Ô²Ù×÷ʱ±¨´í£¬²é¿´´íÎóÈÕÖ¾£¬ÄÚÈÝÈçÏ£º
Error Code: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=50913 DEFAULT CHARSET=gbk' at line 21
ÔÒòÈçÏ£º
µ¼³öÎļþÖеÄÔ´Â룺
PRIMARY KEY (`row_id`) USING BTREE,
UNIQUE KEY `columnAindex` (`columnA`),
KEY `columnBindex` (`columnB`) USING HASH,
KEY `columnCindex` (`columnC`) USING BTREE,
...
ÕýÈ·µÄд·¨:
PRIMARY KEY USING BTREE (`row_id`),
UNIQUE KEY `columnAindex` (`columnA`),
KEY `columnBindex` USING HASH (`columnB`),
KEY `columnCindex` USING BTREE (`columnC`),
...
½«µ¼³öÎļþÖеÄËùÓÐË÷ÒýÀàÐÍ£¨USING BTREE µÈ£©Å²µ½Ë÷ÒýÁУ¨columnBµÈ£©µÄÇ°Ã棬¾ÍÄܹ»Õý³£Íê³Éµ¼Èë²Ù×÷¡£
Ïà¹ØÎĵµ£º
1 1 Linux Red Hat 7.2 °²×°
¡¡¡¡Red Hat Linux 7.2µÄ°²×°¹âÅ̹²ÓÐÁ½ÕÅ£ºµÚÒ»ÕÅ¿ÉÒÔÖ±½Ó´Ó¹âÅÌÆô¶¯£¬°üº¬Á˴󲿷ֵÄÈí¼þ°üºÍһЩ°²×°¹¤¾ß£»µÚ¶þÕŹâÅ̳ýÁ˸½¼ÓµÄÈí¼þ°üÍ⣬Ö÷ÒªÊÇÔ´Âë¡¢Ô¤ÀÀ°æÈí¼þµÈ¡£
¡¡¡¡Red Hat Linux 7.2µÄ°²×°½çÃæ·Ç³£ÓѺã¬×óÃæÓм´Ê±Ï꾡µÄ°ïÖúÐÅÏ¢£¬ÓÒÃæÊÇÑ¡ÏÍêÈ«Ö§³ÖÊó±ê²Ù×÷¡£
¡¡¡¡½« ......
Mysql°²×°
MysqlµÄ°²×°Îļþ¿ÉÒÔÖ±½Óµ½ http://www.mysql.com ÏÂÔØ£¬»ñµÃfor win32µÄ.zip°ü£¬½¨ÒéÑ¡Ôñ4.0.20d°æ±¾¡£ÕâÀï²»Ïêϸ˵Ã÷¡£
¡¡¡¡ÏÂÔØ»ñµÃMysqlµÄfor win32°²×°°üºó£¬ÓÃwinzip½âѹËõ£¬Ö±½ÓÔËÐÐsetup.exe£¬ÐèҪעÒâµÄÊÇÑ¡ÔñÒ»¸ö°²×°Â·¾¶£¬µ±È»£¬°²×°Â·¾¶¿ÉÒÔÈÎÒ⣬½¨ÒéÑ¡ÔñC:\MySQLĿ¼¡£°²×°Íê³ÉºóMySQLÒ²¾ÍÍê³É ......
µÚÒ»¡¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þ¡¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µÚÈý¡ ......
1¡¢PHP·¢ËÍÖÐÎÄ¡¢Ajax½ÓÊÕ
Ö»ÐèÔÚphp¶¥²¿¼ÓÈëÒ»¾ä£º
header('Content-type: text/html;charset=GB2312');
xmlHttp»áÕýÈ·½âÎöÆäÖеÄÖÐÎÄ¡£
2¡¢Ajax·¢ËÍÖÐÎÄ¡¢PHP½ÓÊÕ
Õâ¸ö±È½Ï¸´ÔÓ£º
AjaxÖÐÏÈÓÃencodeURIComponent¶ÔÒªÌá½»µÄÖÐÎĽøÐбàÂë
PHPÖУº
$GB2312string=iconv( ‘UTF-8′, ‘gb2312//I ......
MYSQLÖÐÐ޸ıí½á¹¹ALTERÓ÷¨
ALTER TABLE Result ADD xinlinDoc longblob;
ALTER TABLE Result ADD xinlinDocName varchar(50);
ÆäËüʵÀý£º
CREATE TABLE t1(a INTEGER,b CHAR(10)); // ´´½¨µÄ±ít1¿ªÊ¼
ALTER TABLE t1 RENAME t2; // ÖØÃüÃû±í£¬´Ót1µ½t2
ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR( ......