mysqlµ÷ÓÅ
http://hi.baidu.com/xuwanbest/blog/item/193fd93dda509303bba167e3.html
http://wangdei.javaeye.com/blog/214265
¹ØÓÚ MySQL µ÷ÓÅ
ÓÐ 3 ÖÖ·½·¨¿ÉÒÔ¼Ó¿ì MySQL ·þÎñÆ÷µÄÔËÐÐËٶȣ¬Ð§Âʴӵ͵½¸ßÒÀ´ÎΪ£º
Ìæ»»ÓÐÎÊÌâµÄÓ²¼þ¡£
¶Ô MySQL ½ø³ÌµÄÉèÖýøÐе÷ÓÅ¡£
¶Ô²éѯ½øÐÐÓÅ»¯¡£
ǨÒƵ½ DB2
ÄúÕýÔÚÑ°ÕÒÒ»Öָɾ»ÀûÂä¡¢Î޳ɱ¾µÄ·½·¨ÓÃÀ´´Ó MySQL ǨÒƵ½ IBM® DB2® Â𣿓´Ó MySQL »ò PostgreSQL ǨÒƵ½ DB2 Express-C
” ½éÉÜÁËÈçºÎʹÓÃÎÄÖÐÌṩµÄǨÒƹ¤¾ßÀ´¼òµ¥µØʵÏÖÕâÖÖת»»¡£¿ÉÒÔ ÏÂÔØ
Ãâ·ÑµÄ DB2 Express-C ²¢¿ªÊ¼ÌåÑé¡£
Ìæ»»ÓÐÎÊÌâµÄÓ²¼þͨ³£ÊÇÎÒÃǵĵÚÒ»¿¼ÂÇ£¬Ö÷ÒªÔÒòÊÇÊý¾Ý¿â»áÕ¼ÓôóÁ¿×ÊÔ´¡£²»¹ýÕâÖÖ½â¾ö·½°¸Ò²¾Í½öÏÞÓÚ´ËÁË¡£Êµ¼ÊÉÏ£¬Äúͨ³£¿ÉÒÔÈÃÖÐÑë´¦ÀíÆ÷£¨CPU£©»ò´ÅÅÌËٶȼӱ¶£¬Ò²¿ÉÒÔÈÃÄÚ´æÔö´ó 4 µ½ 8 ±¶¡£
µÚ¶þÖÖ·½·¨ÊÇ¶Ô MySQL ·þÎñÆ÷£¨Ò²³ÆΪ mysqld
£©½øÐе÷ÓÅ¡£¶ÔÕâ¸ö½ø³Ì½øÐе÷ÓÅÒâζ×ÅÊʵ±µØ·ÖÅäÄڴ棬²¢Èà mysqld
Á˽⽫»á³ÐÊܺÎÖÖÀàÐ͵ĸºÔØ¡£¼Ó¿ì´ÅÅÌÔËÐÐËٶȲ»Èç¼õÉÙËùÐèµÄ´ÅÅÌ·ÃÎÊ´ÎÊý¡£ÀàËƵأ¬È·±£ MySQL ½ø³ÌÕýÈ·²Ù×÷¾ÍÒâζ×ÅËü»¨·ÑÔÚ·þÎñ²éѯÉϵÄʱ¼äÒª¶àÓÚ»¨·ÑÔÚ´¦Àíºǫ́ÈÎÎñ£¨Èç´¦ÀíÁÙʱ´ÅÅ̱í»ò´ò¿ªºÍ¹Ø±ÕÎļþ£©ÉϵÄʱ¼ä¡£¶Ô mysqld
½øÐе÷ÓÅÊDZ¾ÎĵÄÖص㡣
×îºÃµÄ·½·¨ÊÇÈ·±£²éѯÒѾ½øÐÐÁËÓÅ»¯¡£ÕâÒâζ×ŶԱíÓ¦ÓÃÁËÊʵ±µÄË÷Òý£¬²éѯÊÇ°´ÕÕ¿ÉÒÔ³ä·ÖÀûÓà MySQL ¹¦Äܵķ½Ê½À´±àдµÄ¡£¾¡¹Ü±¾ÎIJ¢Ã»Óаüº¬²éѯµ÷ÓÅ·½ÃæµÄÄÚÈÝ£¨ºÜ¶àÖø×÷ÖÐÒѾÕë¶ÔÕâ¸öÖ÷Ìâ½øÐÐÁË̽ÌÖ£©£¬²»¹ýËü»áÅäÖà mysqld
À´±¨¸æ¿ÉÄÜÐèÒª½øÐе÷ÓŵIJéѯ¡£
ËäÈ»ÒѾΪÕâЩÈÎÎñÖ¸ÅÉÁË´ÎÐò£¬µ«ÊÇÈÔȻҪעÒâÓ²¼þºÍ mysqld
µÄÉèÖÃÒÔÀûÓÚÊʵ±µØµ÷ÓŲéѯ¡£»úÆ÷ËÙ¶ÈÂýÒ²¾Í°ÕÁË£¬ÎÒÔø¾¼û¹ýËٶȺܿìµÄ»úÆ÷ÔÚÔËÐÐÉè¼ÆÁ¼ºÃµÄ²éѯʱÓÉÓÚ¸ºÔعýÖضøʧ°Ü£¬ÒòΪ mysqld
±»´óÁ¿·±Ã¦µÄ¹¤×÷ËùÕ¼Óöø²»ÄÜ·þÎñ²éѯ¡£
»ØÒ³Ê×
¼Ç¼ÂýËÙ²éѯ
ÔÚÒ»¸ö SQL ·þÎñÆ÷ÖУ¬Êý¾Ý±í¶¼ÊDZ£´æÔÚ´ÅÅÌÉϵġ£Ë÷ÒýΪ·þÎñÆ÷ÌṩÁËÒ»ÖÖÔÚ±íÖвéÕÒÌض¨Êý¾ÝÐеķ½·¨£¬¶ø²»ÓÃËÑË÷Õû¸ö±í¡£µ±±ØÐëÒªËÑË÷Õû¸ö±íʱ£¬¾Í³ÆΪ±íɨÃè
¡£Í¨³£À´Ëµ£¬Äú¿ÉÄÜֻϣÍû»ñµÃ±íÖÐÊý¾ÝµÄÒ»¸ö×Ó¼¯£¬Òò´ËÈ«±íɨÃè»áÀË·Ñ´óÁ¿µÄ´ÅÅÌ I/O£¬Òò´ËÒ²¾Í»áÀË·Ñ´óÁ¿Ê±¼ä¡£µ±±ØÐë¶ÔÊý¾Ý½øÐÐÁ¬½Óʱ£¬Õâ¸öÎÊÌâ¾Í¸ü¼Ó¸´ÔÓÁË£¬ÒòΪ±ØÐëÒª¶ÔÁ¬½ÓÁ½¶ËµÄ¶àÐÐÊý¾Ý½øÐбȽϡ£
µ±
È»£¬±íɨÃè²¢²»×ÜÊÇ»á´øÀ´ÎÊÌ⣻ÓÐʱ¶ÁÈ¡Õû¸ö±í·´¶ø»á±È´ÓÖÐÌôÑ¡³öÒ»²¿·ÖÊý¾Ý¸ü¼ÓÓÐЧ£¨·þÎñÆ÷½ø³ÌÖвéѯ
Ïà¹ØÎĵµ£º
1¡¢mysql_connect()-½¨Á¢Êý¾Ý¿âÁ¬½Ó {3RY4HVT?
¸ñʽ£º Fv n:V\eb
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]]) _I;+p eq
Àý£º 1(V>8}zn
$conn = @mysql_connect("localhost", "username", "password") or dir(" ......
Õ⼸Ìì°²×°ÁËһ̨linux·þÎñÆ÷¡£±¾À´Ò»Î»Í¦¼òµ¥¸öÊ£¬Ã»Ïëµ½ÕÛÌÚÁ˺ü¸Ìì¡£
Ê×ÏÈÊÇ °²×° AS4.4
·þÎñÆ÷ÊÇÁªÏë R520 G6£¬±¾ÒÔΪŪ¸öаæµÄunbuntu¾ÍÄÜÇý¶¯ÆðÀ´£¬Ã»Ïëµ½ÉÏÀ´¾ÍÓöµ½ÁËÂé·³¡£Ð°æµÄlinux»¹ÊÇû°ì·¨Çý¶¯ÆðÀ´£¬ÁªÏëËæ»ú¸øµÄÇý¶¯×î¸ß¾Íµ½AS4.4£¬Ã»°ì·¨Ö»ºÃÕÒÕÒAS4.4 °²×°ÁË¡£
Ê×ÏȹâÅÌÆô¶¯ ÊäÈë linux dd&nb ......
Íü¼ÇMySQL ROOTÃÜÂëÊÇÔÚMySQLʹÓÃÖкܳ£¼ûµÄÎÊÌ⡣ûÏëµ½½ñÌì¾ÍÅöµ½ÕâÑùÒ»¸öÎÊÌ⣺ÄÚ²¿µÄmysqlµÄrootÃÜÂë±»ÐÞ¸ÄÁË¡£²éÔÄ×ÊÁÏ£¬ÓÐÈçÏ·½·¨£º Unix&Linux£º
1.ÓÃroot»òÕßÔËÐÐmysqldµÄÓû§µÇ¼ϵͳ£»
2£®ÀûÓÃkillÃüÁî½áÊøµômysqldµÄ½ø³Ì£»
3£®Ê¹ÓÃ--skip-grant-tables²ÎÊýÆô¶¯MySQL Server
shell& ......
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 ¾¹È»ÓÐÁ½¸öÊýÁ ......
mysql ½Øȡijһ¸öʱ¼ä(datetimeÀàÐÍ)µÄÈÕÆÚ£º
·½·¨1£ºselect date(row_name) from table_name where row = row1;
·½·¨2£ºselect left(row_name, 10) from table_name where row = row1;
·½·¨3£ºselect cast(row_name as char[10]) from table_name where row = row1;
È¡µÃij¸öÈÕÆÚµÄtime_tÊýÖµ£ºselect unix_times ......