Mysql±àÒë°²×°²ÎÊýÓÅ»¯
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-align-double \
-felide-constructors -fno-exceptions -fno-rtti"
Èç¹ûÊÇInter´¦ÀíÆ÷£¬Ê¹ÓÃpgccÌá¸ß1%ÐÔÄÜ
3. Unix Socket 7.5%
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
ʹÓÃunixÌ×½Ó×ÖÁ´½ÓÌá¸ß7.5%ÐÔÄÜ£¬ËùÒÔÔÚwindowsÏÂmysqlÐÔÄܿ϶¨²»ÈçunixÏÂÃæ
4. --enable-assembler
ÔÊÐíʹÓûã±àģʽ(ÓÅ»¯ÐÔÄÜ)
ÏÂÃæÊÇ×ÜÌåµÄ±àÒëÎļþ
±àÒë´úÂë
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti -fomit-frame-pointer -ffixed-ebp"
./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
--with-charset=utf8
--with-collation=utf8_general_ci
--with-extra-charsets=all
Ïà¹ØÎĵµ£º
select id from message where author_id in (select followed_id from Relation where follower_id=1) order by id desc ºÍ ·Ö±ðÖ´ÐÐ $userlist = select followed_id from Relation where follower_id=1 ÔÙ select id from message where author_id in ($userlist) order by id desc ¾¹È»ÓÐÁ½¸öÊýÁ ......
Ò»¡¢INSERTºÍREPLACE
INSERTºÍREPLACEÓï¾äµÄ¹¦Äܶ¼ÊÇÏò±íÖвåÈëеÄÊý¾Ý¡£ÕâÁ½ÌõÓï¾äµÄÓï·¨ÀàËÆ¡£ËüÃǵÄÖ÷ÒªÇø±ðÊÇÈçºÎ´¦ÀíÖظ´µÄÊý¾Ý¡£
1. INSERTµÄÒ»°ãÓ÷¨
MySQLÖеÄINSERTÓï¾äºÍ±ê×¼µÄINSERT²»Ì«Ò»Ñù£¬ÔÚ±ê×¼µÄSQLÓï¾äÖУ¬Ò»´Î²åÈëÒ»Ìõ¼Ç¼µÄINSERTÓï¾äÖ»ÓÐÒ»ÖÖÐÎʽ¡£
INSERT INTO tablename(ÁÐÃû…) ......
°æȨÉùÃ÷£º¿ÉÒÔÈÎÒâתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://www.5ilinux.com/lamp01.html
¹Ø¼ü×Ö£ºapache+mysql+php apache mysql php ÅäÖà lamp ·þÎñÆ÷ web
Linux+Apache+Mysql+PHPµäÐÍÅäÖÃ
µ÷ÊÔ»·¾³£ºRedhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
LinuxϵͳµÄ°²×°ÎҾͲ»½²Á ......
MySQL 5.1 ÖУ¬ÔÚ¸´ÖÆ·½ÃæµÄ¸Ä½ø¾ÍÊÇÒý½øÁËеĸ´ÖƼ¼Êõ£º»ùÓÚÐеĸ´ÖÆ¡£
MYSQL¸´ÖƵļ¸ÖÖģʽ
MySQL 5.1 ÖУ¬ÔÚ¸´ÖÆ·½ÃæµÄ¸Ä½ø¾ÍÊÇÒý½øÁËеĸ´ÖƼ¼Êõ£º»ùÓÚÐеĸ´ÖÆ¡£
¼òÑÔÖ®£¬ÕâÖÖм¼Êõ¾ÍÊǹØ×¢±íÖз¢Éú±ä»¯µÄ¼Ç¼£¬¶ø·ÇÒÔÇ°µÄÕÕ³ binlog ģʽ¡£
´Ó MySQL 5.1.12 ¿ªÊ¼£¬¿ÉÒÔÓÃÒÔÏÂÈýÖÖģʽÀ´ÊµÏÖ£º
-- »ùÓÚ ......
1. ʹÓÃGRANTÓï¾äÌí¼Ó£ºÊ×ÏÈÔÚÊý¾Ý¿â±¾»úÉÏÓÃROOTÓû§
µÇ¼MySql£¨ÎÒÊÇÓÃÔ¶³Ì¿ØÖÆlinux·þÎñÆ÷£¬Ï൱ÓÚÔÚ·þÎñÆ÷±¾»úµÇ¼MySqlÁË£©£¬È»ºóÊäÈ룺
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY 'something' WITH GRANT OPTION;
Ìí¼ÓÒ»¸öÓû§admin²¢ÊÚȨͨ¹ý±¾µØ»ú£¨localhost)·ÃÎÊ£¬ÃÜÂë“s ......