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

mysql¼Ü¹¹·½°¸

Scale Out£ººáÏòÀ©Õ¹£¬Ôö¼Ó´¦Àí½ÚµãÌá¸ßÕûÌå´¦ÀíÄÜÁ¦
Scale Up£º×ÝÏòÀ©Õ¹£¬Í¨¹ýÌáÉýµ¥¸ö½ÚµãµÄ´¦ÀíÄÜÁ¦´ïµ½ÌáÉýÕûÌå´¦ÀíÄÜÁ¦µÄÄ¿µÄ
Replication
MySQLµÄreplicationÊÇÒì²½µÄ£¬ÊÊÓÃÓÚ¶ÔÊý¾ÝʵʱÐÔÒªÇó²»ÊÇÌرð¹Ø¼üµÄ³¡¾°¡£slave¶ËµÄIOÏ̸߳ºÔð´Ómaster¶ÁÈ¡ÈÕÖ¾£¬SQLÏß ³ÌרߺÔðÔÚslave¶ËÓ¦ÓôÓmaster¶Á¹ýÀ´µÄÈÕÖ¾£¨ÔçÆÚMySQLÓÃÒ»¸öÏß³ÌʵÏÖ£¬ÐÔÄÜÎÊÌâ±È½ÏÃ÷ÏÔ£©¡£Ê¹ÓÃreplication±ØÐëÆôÓà binary log£¬MySQLÓÃbinary logÏòslave·Ö·¢¸üÐÂ
¸´ÖƼ¶±ð
1. Row Level£º5.1.5¿ªÊ¼Ö§³Ö¡£mater¼Ç¼ÿÐÐÊý¾ÝµÄ¸ü¸ÄÈÕÖ¾£¬slave¸ù¾ÝÈÕÖ¾ÖðÐÐÓ¦Óá£Óŵ㣺Êý¾ÝÒ»ÖÂÐÔ¸üÓб£ÕÏ¡£È±µã£º¿ÉÄÜÔì³ÉÈÕÖ¾Îļþ±È½Ï´ó
2. Statement Level£ºmaster¼Ç¼ÿ¸öÖ´ÐеÄqueryÓï¾äÒÔ¼°Ò»Ð©ÉÏÏÂÎÄÐÅÏ¢£¬slave½Úµã¸ù¾ÝÕâЩÐÅÏ¢ÖØÐÂÔÚslaveÉÏÖ´ÐС£Óŵ㣺binary log±È½ÏС¡£È±µã£ºÄ³Ð©Çé¿öÏÂÊý¾ÝÒ»ÖÂÐÔÄÑÒÔ±£ÕÏ
3. Mixed Level£ºMySQL¸ù¾ÝÇé¿öÑ¡ÔñÄÄÖÖ¸´ÖÆ·½Ê½¡£5.1.8¿ªÊ¼Ö§³Ö
³£Óüܹ¹
1. Master-Slaves£ºÍ¨³£¶¼²ÉÓÃÕâÖÖ·½Ê½
2. Dual Master(Master-Master)£º2¸ömaster½Úµã»¥Ïàͬ²½¸üС£ÒòΪMySQLµÄÒì²½¸´ÖÆ·½Ê½£¬ÎªÁË·ÀÖ¹Êý¾Ý³åÍ»Ôì³ÉµÄ²»Ò»ÖÂÐÔ£¬Ò»°ã ½ö½«ÆäÖÐһ̨ÓÃÓÚд²Ù×÷£¬Áíһ̨²»Óûò½öÓÃÓÚ¶Á²Ù×÷¡£Ä¿µÄÊÇÆäÖÐһ̨masterÍ£»úά»¤»òÕß¹ÊÕÏÖжÏʱ¿ÉÒÔʹÓÃÁíһ̨master
3. ¼¶Áª¸´ÖÆ(Master-Slaves-Slaves)£ºÔÚMaster SlavesÖУ¬Èç¹ûslaves¹ý¶àreplication½«Ôö¼ÓmasterµÄ¸ºÔØ£¬Õâʱ¿ÉÒÔÈÃmasterÖ»ÏòÆäÖм¸Ì¨slave·Ö·¢¸üÐÂÈÕÖ¾£¬Õâ ¼¸Ì¨slave×÷Ϊһ¼¶½ÚµãÔÙÏòϼ¶½Úµã·Ö·¢¸üÐÂÈÕÖ¾
Cluster
Ö÷Ҫͨ¹ýNDB Cluster´æ´¢ÒýÇæʵÏÖ£¬ÊÇÒ»¸öShare NothingµÄ¼Ü¹¹£¬¸÷¸öMySQL ServerÖ®¼ä²¢²»ÐèÒª¹²ÏíÈκÎÊý¾Ý¡£¿ÉÒÔʵÏÖÈßÓࣨ¿É¿¿ÐÔ£©ÒÔ¼°¸ºÔؾùºâ¡£¸Õ¿ªÊ¼MySQLÐèÒªËùÓÐÊý¾ÝºÍË÷Òý¶¼Äܹ»¼ÓÔص½ÄÚ´æÖвÅÄÜʹÓà Cluster£¬¶ÔÄÚ´æÒªÇó¸ß£¬Ä¿Ç°Í¨¹ý¸Ä½øÖ»ÒªÇóË÷ÒýÄÜÈ«²¿¼ÓÔص½ÄÚ´æ
MySQL Clusrer¼Ü¹¹Ê¾Òâͼ£¬Í¼Æ¬À´×ÔMySQL¹Ù·½Îĵµ
1. SQL Nodes£º¸ºÔð´æ´¢²ãÖ®ÍâµÄÊÂÇ飬ÀýÈçÁ¬½Ó¹ÜÀí¡¢query´¦ÀíºÍÓÅ»¯¡¢cache¹ÜÀíµÈ£¬¼´°þÀëÁË´æ´¢²ãµÄMySQL·þÎñÆ÷
2. Data Nodes£º´æ´¢²ãµÄNDB½Úµã£¬¼´Cluster»·¾³ÏµĴ洢ÒýÇ档ÿ¸öcluster½Úµã±£´æÍêÕûÊý¾ÝµÄÒ»¸ö·ÖƬ£¬ÊÓ½ÚµãÊýÄ¿ºÍÅäÖöø¶¨£¬Ò»°ã data nodes±»×éÖ¯³ÉΪһ¸ö¸ögroup£¬Ã¿¸ögroup´æÓÐÒ»·ÝÍêÈ«ÏàͬµÄÎïÀíÊý¾Ý£¨ÈßÓࣩ¡£NDB´æ´¢ÒýÇæÊ×ÏÈ°´ÕÕÈßÓà²ÎÊýÅäÖÃÀ´Ê¹Óô洢½Úµã£¬È»ºó¸ù ¾Ý½ÚµãÊýÄ¿¶ÔÊý¾Ý½øÐзֶÎ
3. Management Server£º¸ºÔðÕ


Ïà¹ØÎĵµ£º

Using JDBC with MySQL, Getting Started

http://www.developer.com/java/data/article.php/3417381/Using-JDBC-with-MySQL-Getting-Started.htm#Preface
Preface
Purpose
The purpose of this lesson is to get you beyond the initial hurdles involved in:
Downloading and installing a MySQL database server.
Preparing that database for use with JDBC ......

MySQLÁ¬½Óʱ¿ìʱÂýµÄÎÊÌâ½â¾ö

 my.iniÀïµÄÄǸötmp_table_sizeµÄÖµ.Ô­À´tmp_table_size=16M.ÎÒ¸ÄΪ32M
È»ºóÖØÆôMYSQL»¹ÊÇû½â¾öÎÊÌâ.
Ö»ºÃÖØÆô·þÎñÆ÷ÊÔÊÔÁË,½á¹ûÖØÆôºóCPUÕý³£ÁË.²»¹ý»¹ÊÇûÕÒ³öÊÇʲôԭÒòµ¼ÖÂMYSQLÕ¼ÓÃÄÇô¶àCPU×ÊÔ´.
=====================================
ÐÞ¸ÄhostsÎļþ£¬¼ÓÈëÒ»ÐР  
172.16.59.12   & ......

mysqlµÄÓ÷¨

 Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
Create DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ