Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MySQL ´æ´¢ÒýÇæInnoDB/MYISAM

Ò»¡¢MYSQL´æ´¢ÒýÇæ´óÈ«£º
·MyISAM£ºÄ¬ÈϵÄMySQL²å¼þʽ´æ´¢ÒýÇ棬ËüÊÇÔÚWeb¡¢Êý¾Ý²Ö´¢ºÍÆäËûÓ¦Óû·¾³ÏÂ×ʹÓõĴ洢ÒýÇæÖ®Ò»¡£×¢Ò⣬ͨ¹ý¸ü¸ÄSTORAGE_ENGINEÅäÖñäÁ¿£¬Äܹ»·½±ãµØ¸ü¸ÄMySQL·þÎñÆ÷µÄĬÈÏ´æ´¢ÒýÇæ¡£
·InnoDB£ºÓÃÓÚÊÂÎñ´¦ÀíÓ¦ÓóÌÐò£¬¾ßÓÐÖÚ¶àÌØÐÔ£¬°üÀ¨ACIDÊÂÎñÖ§³Ö¡£
·BDB£º¿ÉÌæ´úInnoDBµÄÊÂÎñÒýÇ棬֧³ÖCOMMIT¡¢ROLLBACKºÍÆäËûÊÂÎñÌØÐÔ¡£
·Memory£º½«ËùÓÐÊý¾Ý±£´æÔÚRAMÖУ¬ÔÚÐèÒª¿ìËÙ²éÕÒÒýÓúÍÆäËûÀàËÆÊý¾ÝµÄ»·¾³Ï£¬¿ÉÌṩ¼«¿ìµÄ·ÃÎÊ¡£
·Merge£ºÔÊÐíMySQL
DBA»ò¿ª·¢ÈËÔ±½«Ò»ÏµÁеÈͬµÄMyISAM±íÒÔÂß¼­·½Ê½×éºÏÔÚÒ»Æ𣬲¢×÷Ϊ1¸ö¶ÔÏóÒýÓÃËüÃÇ¡£¶ÔÓÚÖîÈçÊý¾Ý²Ö´¢µÈVLDB»·¾³Ê®·ÖÊʺϡ£
·Archive£ºÎª´óÁ¿ºÜÉÙÒýÓõÄÀúÊ·¡¢¹éµµ¡¢»ò°²È«Éó¼ÆÐÅÏ¢µÄ´æ´¢ºÍ¼ìË÷ÌṩÁËÍêÃÀµÄ½â¾ö·½°¸¡£
·Federated£ºÄܹ»½«¶à¸ö·ÖÀëµÄMySQL·þÎñÆ÷Á´½ÓÆðÀ´£¬´Ó¶à¸öÎïÀí·þÎñÆ÷´´½¨Ò»¸öÂß¼­Êý¾Ý¿â¡£Ê®·ÖÊʺÏÓÚ·Ö²¼Ê½»·¾³»òÊý¾Ý¼¯Êл·¾³¡£
·Cluster/NDB£ºMySQLµÄ´ØʽÊý¾Ý¿âÒýÇ棬ÓÈÆäÊʺÏÓÚ¾ßÓиßÐÔÄܲéÕÒÒªÇóµÄÓ¦ÓóÌÐò£¬ÕâÀà²éÕÒÐèÇó»¹ÒªÇó¾ßÓÐ×î¸ßµÄÕý³£¹¤×÷ʱ¼äºÍ¿ÉÓÃÐÔ¡£
·Other£ºÆäËû´æ´¢ÒýÇæ°üÀ¨CSV£¨ÒýÓÃÓɶººÅ¸ô¿ªµÄÓÃ×÷Êý¾Ý¿â±íµÄÎļþ£©£¬Blackhole£¨ÓÃÓÚÁÙʱ½ûÖ¹¶ÔÊý¾Ý¿âµÄÓ¦ÓóÌÐòÊäÈ룩£¬ÒÔ¼°ExampleÒýÇ棨¿ÉΪ¿ìËÙ´´½¨¶¨ÖƵIJå¼þʽ´æ´¢ÒýÇæÌṩ°ïÖú£©¡£
Çë¼Çס£¬¶ÔÓÚÕû¸ö·þÎñÆ÷»ò·½°¸£¬Äã²¢²»Ò»¶¨ÒªÊ¹ÓÃÏàͬµÄ´æ´¢ÒýÇ棬Äã¿ÉÒÔΪ·½°¸ÖеÄÿ¸ö±íʹÓò»Í¬µÄ´æ´¢ÒýÇ棬ÕâµãºÜÖØÒª¡£
¶þ¡¢Öصã±È½ÏMySQLµÄInnoDBºÍMyISAM
(1)¡¢InnoDBºÍMyISAMÊÇÔÚʹÓÃMySQL×î³£ÓõÄÁ½¸ö±íÀàÐÍ£¬¸÷ÓÐÓÅȱµã£¬ÊÓ¾ßÌåÓ¦Óöø¶¨¡£
¸ß¼¶´¦Àí:
MyISAMÀàÐͲ»Ö§³ÖÊÂÎñ´¦ÀíµÈ¸ß¼¶´¦Àí£¬¶øInnoDBÀàÐÍÖ§³Ö¡£
Ö´ÐÐËÙ¶È:
MyISAMÀàÐ͵ıíÇ¿µ÷µÄÊÇÐÔÄÜ£¬ÆäÖ´ÐÐÊý¶È±ÈInnoDBÀàÐ͸ü¿ì¡£
ÒÆÖµÐÔ:
MyISAMÀàÐ͵Ķþ½øÖÆÊý¾ÝÎļþ¿ÉÒÔÔÚ²»Í¬²Ù×÷ϵͳÖÐǨÒÆ¡£Ò²¾ÍÊÇ¿ÉÒÔÖ±½Ó´ÓWindowsϵͳ¿½±´µ½linuxϵͳÖÐʹÓá£
(2)¡¢MyIASMÊÇIASM±íµÄа汾£¬ÓÐÈçÏÂÀ©Õ¹£º
1¡¢¶þ½øÖƲã´ÎµÄ¿ÉÒÆÖ²ÐÔ¡£
2¡¢NULLÁÐË÷Òý¡£
3¡¢¶Ô±ä³¤ÐбÈISAM±íÓиüÉÙµÄËéƬ¡£
4¡¢Ö§³Ö´óÎļþ¡£
5¡¢¸üºÃµÄË÷ÒýѹËõ¡£
6¡¢¸üºÃµÄ¼üÂëͳ¼Æ·Ö²¼¡£
7¡¢¸üºÃºÍ¸ü¿ìµÄauto_increment´¦Àí¡£
InnoDB ÊÇ MySQL ÉϵÚÒ»¸öÌṩÍâ¼üÔ¼ÊøµÄÒýÇ棬³ýÁËÌṩÊÂÎñ´¦ÀíÍ⣬InnoDB
»¹Ö§³ÖÐÐËø£¬ÌṩºÍ Oracle Ò»ÑùµÄÒ»ÖÂÐԵIJ»¼ÓËø¶ÁÈ¡£¬ÄÜÔö¼Ó²¢·¢¶ÁµÄÓû§ÊýÁ


Ïà¹ØÎĵµ£º

mysql access deined

ÎÒµÄϵͳÊÇubuntu6.06£¬×î½üÐÂ×°ºÃµÄmysqlÔÚ½øÈëmysql¹¤¾ßʱ£¬×ÜÊÇÓдíÎóÌáʾ:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ʹÓÃÍøÉϽéÉܵķ½·¨ÐÞ¸ÄrootÓû§µÄÃÜÂ룺
# mysqladmin -uroot -p password 'newpassword'
Enter password:
m ......

Íü¼ÇÁËMySQLµÄrootÃÜÂëÓ¦µ±ÈçºÎÈ¡»Ø

ÎÊ£ºÈç¹ûÍü¼ÇÁËMySQLµÄrootÃÜÂëÓ¦µ±ÈçºÎÈ¡»Ø£¿
´ð£º½â¾ö·½·¨ÈçÏ£º
·¨1£ºÔÚmy.cnfµÄ[mysqld]×ֶμÓÈ룺
skip-grant-tables
È»ºóÖØÆôÄãµÄmysqld,ÕâÑù¾ÃûÓÐÃÜÂëÁË.
È»ºó½øÈëmysql¡£
UPDATE mysql.user SET Password=PASSWORD
('password') WHERE User='root';
³É¹¦ºó
FLUSH PRIVILEGES;
×îºóÈ¥µômy.cnfÖеÄs ......

MySQL×Ö·û´®´¦Àíϵͳ

ÒÔÏÂÊÇÍêÕûµÄÀý×Ó¡£
1¡¢Ð½¨±í
#title: ×Ô¶¨Òå×Ö·û
#auther: Ð¡Ç¿(Õ¼²·Ê¦) 
#date: 
2008
-
01
-08
drop
 
table
 
if
 
exists
 Category;
create
 
table
 Category
(
   cateId       &nbs ......

mysql UDF+triggerµÄÉñÆæħÁ¦

  1.ʲôÊÇUDF? UDF(user-defined function)ÊÇmysqlΪÓû§ÌṩµÄ×Ô¶¨Ò庯ÊýµÄÀ©Õ¹½Ó¿Ú¡£Ëü±¾ÖÊÉϺÍmysqlÌṩµÄmax¡¢minºÍcountµÈº¯ÊýÀàËÆ¡£ 2.UDF¿ÉÒÔ×öʲô? UDFÊÇ×Ô¶¨Ò庯Êý£¬ËùÒÔËüÄÜ×öʲôÍêÈ«È¡¾öÓÚÄãµÄʵÏÖ¡£UDF¿ÉÒÔÔÚÆÕͨµÄsql¡¢triggerÒÔ¼°store procedure±»µ÷ÓᣠÈç¹û×Ô¶¨ÒåÒ»¸ötcp_send(ip,port,msg)µ ......

ÅжÏMySQLÁ¬½ÓÊÇ·ñÓÐЧ

²Î¼û¹Ù·½²Î¿¼£¬µÚ25Õ£ºAPIºÍ¿â
25.2.3.49. mysql_ping()
int
mysql_ping(MYSQL *mysql)


ÃèÊö
¼ì²éÓë·þÎñÆ÷µÄÁ¬½ÓÊÇ·ñ¹¤×÷¡£Èç¹ûÁ¬½Ó¶ªÊ§£¬½«×Ô¶¯³¢ÊÔÔÙÁ¬½Ó¡£
¸Ãº¯Êý¿É±»ÏÐÖÃÁ˽ϳ¤Ê±¼äµÄ¿Í»§¶ËʹÓã¬ÓÃÒÔ¼ì²é·þÎñÆ÷ÊÇ·ñÒѹرÕÁËÁ¬½Ó£¬²¢ÔÚ±ØҪʱÔÙ´ÎÁ¬½Ó¡£
·µ»ØÖµ
Èç¹ûÓë·þÎñÆ÷µÄÁ¬½ÓÓÐЧ·µ»Ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ