MySQL MyIsam ´æ´¢ÒýÇæË÷Òý³¤¶ÈÏÞÖƲâÊԼǼ
MySQL MyIsam ´æ´¢ÒýÇæÔÚ´´½¨Ë÷ÒýµÄʱºò£¬Ë÷Òý¼ü³¤¶ÈÊÇÓÐÒ»¸ö½ÏΪÑϸñµÄ³¤¶ÈÏÞÖƵģ¬ËùÓÐË÷Òý¼ü×î´ó³¤¶È×ܺͲ»Äܳ¬¹ý1000£¬¶øÇÒ²»ÊÇʵ¼ÊÊý¾Ý³¤¶ÈµÄ×ܺͣ¬¶øÊÇË÷Òý¼ü×ֶζ¨Ò峤¶ÈµÄ×ܺ͡£ÏÂÃæ×ö¸ö¼òµ¥µÄ²âÊÔ£¬¼Ç¼һÏ¡£
root@sky:~# mysql -u sky -p -h127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.0.51a-log MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
sky@127.0.0.1 : (none) 05:23:08> use test;
Database changed
sky@127.0.0.1 : test 05:23:11>
sky@127.0.0.1 : test 05:23:12>
ÏÈ´´½¨Ò»¸öMyIsam±í£¬×Ö·û¼¯Ñ¡Ôñlatin1£¬Èý¸ö×ֶξùÉèÖÃΪvarchar 255£¬£º
sky@127.0.0.1 : test 05:23:12> create table test_ind
-> (a varchar(255),
-> b varchar(255),
-> c varchar(255)
-> ) engine=myisam charset=latin1;
Query OK, 0 rows affected (0.01 sec)
´´½¨Ð§¹û£º
sky@127.0.0.1 : test 05:23:32> show create table test_ind\G
*************************** 1. row ***************************
Table: test_ind
Create Table: CREATE TABLE `test_ind` (
`a` varchar(255) default NULL,
`b` varchar(255) default NULL,
`c` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
Èý¸ö×Ö¶ÎÁªºÏË÷Òý£¨³¤¶ÈÓ¦¸ÃÔÚ1000ÒÔÄÚ£©
sky@127.0.0.1 : test 05:23:41> create index test_a_b_c_ind on test_ind(a,b,c);
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
ÎÒÃÇ¿´µ½£¬´´½¨³É¹¦ÁË¡£
ÏÂÃæÎÒÃÇ×öÒ»´Î×Ö·û¼¯×ª»»£¬½«×Ö·û¼¯×ª»»³Éutf8
sky@127.0.0.1 : test 05:25:54> alter table test_ind convert to charset utf8;
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
sky@127.0.0.1 : test 05:26:24>
sky@127.0.0.1 : test 05:28:03> show create table test_ind\G
*************************** 1. row ***************************
Table: test_ind
Create Table: CREATE TABLE `test_ind` (
`a` varchar(255) default NULL,
`b` varchar(255) default NULL,
`c` varcha
Ïà¹ØÎĵµ£º
1. -static 13%
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
¾²Ì¬Á´½ÓÌá¸ß13%ÐÔÄÜ
2. -pgcc 1%
CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \
CXXFLAGS="-O3 -mpentiumpro -mstack-alig ......
Õâ¶Îʱ¼ä±»Õâ¸öÀ§ÈÅÁ˺ܾã¬Í¨¹ýÐÞ¸ÄÅäÖÃÎļþ£¬ÖÕÓÚ°ÑÕâ¸öÎÊÌâ½â¾öÁË¡£
×Ô¼ºÔÚÍøÉÏÒ²ÕÒÁ˺ܶà¹ØÓÚ½â¾öÕâ¸öÎÊÌâµÄ·½·¨£¬µ«ÊǶ¼½²µÄ²»Ì«Çå³þ£¬ËùÒÔ½ñÌìÔÚÕâÖØÐÂ˵ÏÂÕâ¸öÎÊÌâ¡£
ÎҵĽâ¾ö·½·¨ÊÇͨ¹ýÐÞ¸ÄmysqlµÄÅäÖÃÎļþmy.ini£¬·½·¨ÈçÏ£º
ÔÚmy.iniÖпÉÒÔ·¢ÏÖÓÐÕâôһ¶Î´úÂ룺
[client]
port=3306
[mysql]
default ......
Ä¿Ç°Óв»ÉÙAMP£¨Apache\MySQL\PHP£©µÄ¼¯³ÉÈí¼þ£¬¿ÉÒÔÈÃÎÒÃÇÒ»´Î°²×°²¢ÉèÖúá£Õâ¶ÔÓÚ²»ÊìϤAMPµÄÓû§À´Ëµ£¬ºÃ´¦¶à¶à¡£
Ò»¡¢Ê¹ÓÃAMP¼¯³ÉÈí¼þµÄÓŵ㣺
1¡¢¿É±ÜÃâÓÉÓÚȱ·¦AMPµÄ֪ʶ£¬¶øÎÞ·¨ÕýÈ·ÉèÖû·¾³£»
2¡¢¿É¿ìËÙ°²×°²¢ÉèÖúÃAMP»·¾³£¬ÈÃÎÒÃÇÖ±½Ó¿ªÊ¼ÕæÕý¸ÐÐËȤµÄÈí¼þ£¬Èçxoops£»
3¡¢¿É·½±ãµÄ´î½¨²âÊÔ»·¾³£¬¶ÔÓÚ² ......
±¨´í£º
/tmp/ccBBJEB8.o: In function `ping_sql':
pingsql.c:(.text+0x7c): undefined reference to `mysql_init'
pingsql.c:(.text+0xe1): undefined reference to `mysql_real_connect'
pingsql.c:(.text+0xff): undefined reference to `mysql_close'
pingsql.c:(.text+0x119): undefined reference to `mys ......
MySQL±£Áô¹Ø¼ü×Ö
create table option (oid integer not null auto_increment, oname varchar(255), oinf varchar(255), ovotes integer, oimage varchar(255), ovideo varchar(255), oaudio varchar(255), octime varchar(255), ocuname varchar(255), omtime varchar(255), omuname varchar(255 ......