MySQLѧϰ(7)varchar
½ñÌ콨һ¸öUTF-8µÄ±í£¬ÆäÖÐÈýÁж¼ÓÃÁËvarcharÕâ¸öÊý¾ÝÀàÐÍ£¬ÎÊÌâ¾ÍÕâôÀ´ÁË£¬ÎÒµÄÈý¸ö×ֶγ¤¶È¼ÓÆðÀ´³¬¹ýÁË65535×Ö½Ú¡£ÒÔÇ°ÒÔΪÿһ¸ö×Ö¶Î×î´óΪ65535£¬Ïë²»µ½Ò»¸ö±í¹²Ïí65535×Ö½Ú¡£Òâ˼ÊÇ˵Èý¸ö×ֶγ¤¶È¼ÓÆðÀ´²»Äܳ¬¹ý65535£¬¶ø²ÉÓÃUTF-8µÄ»°£¬Ò»¸ö×Ö·ûÊÇÕ¼Èý¸ö×ֽڵġ£¼´Èý×ֶμÓÆðÀ´µÄ×ܳ¤¶È²»Äܳ¬¹ý21844×Ö½Ú¡£
½¨±íÓï¾äÈçÏ£º
create table note
(
id int not null,
title varchar(64),
content varchar(20000),
abstract varchar(800),
owner int,
primary key (id)
);
¿ÉÒÔÊÔ׎«title£¬content£¬abstract×ֶγ¤¶È¸ÃΪ´óÓÚ21844£¬ÕâÑùÊDz»»á³É¹¦µÄ£¬µ±È»Ç°ÌáÊDZíµÄ±àÂëºÍÁеıàÂ붼Ϊutf-8¡£
Ïà¹ØÎĵµ£º
InnoDBÒ²Ö§³ÖÍâ¼üÔ¼Êø¡£InnoDBÖжÔÍâ¼üÔ¼Êø¶¨ÒåµÄÓï·¨¿´ÆðÀ´ÈçÏ£º
[CONSTRAINT symbol] FOREIGN KEY [id] (index_col_name, ...)
REFERENCES tbl_name (index_col_name, ...)
[ON DELETE {RESTRICT | CASCADE | SET NULL | NO ACTION}]
[ON UPDATE ......
LinuxϵݲװÓëÅäÖÃ
Èç¹ûËù°²×°µÄLinuxϵͳûÓÐÄÚÖõÄMySQL£¬±ÊÕß½¨ÒéÔÚLinuxÖÐʹÓÃRPM°üÀ´°²×°MySQL£¬Í¬ÑùÕâÒ²ÊÇMySQL¹Ù·½ÌṩµÄ½¨Òé¡£±ÊÕß½Ó´¥×î¶àµÄLinuxϵͳÊÇRadhatµÄ“½üÇ×”£ºCentOS£¬ÓÉÓÚCentOS½Ïеİ汾¶¼ÄÚÖÃÁËMySQL£¬Òò´ËÔÚ°²×°ÏµÍ³Ê±¾Í½«MySQL°²×°²¢×¢²áΪϵͳ·þÎñ£¬Ê¡È¥Á˲»ÉÙ¹¤×÷Á¿£¬´Ë´¦Ò²¾Í²» ......
1.Ê×ÏÈÈ·ÈÏÄãÈÕÖ¾ÊÇ·ñÆôÓÃÁË
mysql>show variables like 'log_bin';
mysql>show variables like 'log';
2.Èç¹ûÆôÓÃÁË£¬¼´ON
Èç¹ûûÓÐÆôÓ㬼´OFF£¬
ÒªÐÞ¸Ämy.cnf
# The MySQL server
[mysqld]
# ......
×÷Õߣº°½Ê¿Î°
Mysql ÓõÄÊÇLinux (non RPM packages)
Ò»¡¢½«mysql-5.5.0-m2-linux-i686-glibc23.tar.gzÏÂÔص½/home/ikmb ²¢ÔÚµ±Ç°Ä¿Â¼½âѹ£»
……..
mysql-5.5.0-m2-linux-i686-glibc23/data/mysql/
mysql-5.5.0-m2-linux-i686-glibc23/data/test/
…………
& ......
ÔÚSQL ServerÀィMysqlºÍOracleÊý¾Ý¿âÁ´½Ó»¹ÊDZȽÏÈÝÒ׵ģºÎÒÃÇÏÈÔÚ·þÎñÆ÷ÉÏ°²×°MysqlºÍOracleÊý¾Ý¿âÏà¹ØµÄODBCÇý¶¯³ÌÐò£¬ÔÚ[¹ÜÀí¹¤¾ß]->[Êý¾ÝÔ´(ODBC)] ÉèÖÃϵͳDSN£¬ÈçÏÂͼ:
ÉèÖúÃÁËÒÔºó£¬ÎÒÃÇ¿ÉÒÔÓÃSQL Server×Ô´øµÄµ¼³öºÍµ¼È빤¾ßÀ´Êµ ......