尊龙凯时人生就是搏

ÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯Èº

ÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯Èº

Ò»¡¢Ð¡Ðò

Ëæ×ÅÆóÒµÊý¾ÝµÄÒ»Ö±ÔöÌí £¬Êý¾Ý¿âµÄ¸ß¿ÉÓÃÐÔ±äµÃÔ½À´Ô½Ö÷Òª¡£¸ß¿ÉÓÃÊý¾Ý¿â¼¯ÈºÄܹ»ÌṩһÁ¬¿É¿¿µÄÊý¾Ý»á¼û £¬È·±£ÓªÒµµÄÒ»Á¬ÔËÐС£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚLinux²Ù×÷ϵͳÉÏÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯Èº £¬²¢ÌṩÏìÓ¦µÄ´úÂëʾÀý¡£

¶þ¡¢×¼±¸ÊÂÇé

ÔÚ×îÏÈÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯ÈºÖ®Ç° £¬Ê×ÏÈÐèÒª¾ÙÐÐһЩ׼±¸ÊÂÇé¡£

×°ÖòÙ×÷ϵͳ£ºÑ¡ÔñÒ»ÖÖÎȹ̿ɿ¿µÄLinux¿¯Ðаæ £¬ÀýÈçCentOS¡¢UbuntuµÈ £¬²¢Æ¾Ö¤¹Ù·½Îĵµ¾ÙÐÐ×°Öá£

×°ÖÃÊý¾Ý¿âÈí¼þ£ºÑ¡ÔñÒ»ÖÖ³ÉÊìÎȹ̵ÄÊý¾Ý¿âÈí¼þ £¬ÀýÈçMySQL¡¢PostgreSQLµÈ £¬²¢Æ¾Ö¤¹Ù·½Îĵµ¾ÙÐÐ×°Öá£

ÉèÖÃÍøÂ磺ȷ±£¼¯ÈºÖеĸ÷¸ö½Úµã¿ÉÒÔÏ໥ͨѶ £¬½¨ÒéʹÓþ²Ì¬IPÀ´×èÖ¹IPµØµãµÄ±ä»»¡£

½¨ÉèÊý¾Ý¿âÓû§£º½¨ÉèÒ»¸öרÃÅÓÃÓÚ¼¯ÈºÊý¾Ýͬ²½µÄÊý¾Ý¿âÓû§ £¬²¢ÎªÆäÉèÖúÏÊʵÄȨÏÞ¡£

Èý¡¢ÉèÖÃÊý¾Ý¿â¼¯Èº

ÒÔÏÂÏÈÈÝÒ»ÖÖ³£¼ûµÄÊý¾Ý¿â¼¯Èº¼Ü¹¹¡ª¡ªÖ÷±¸¸´ÖÆģʽ £¬ÆäÖÐÒ»¸ö½ÚµãΪÖ÷½Úµã £¬ÈÏÕæ´¦Àí¶ÁдÇëÇó £¬ÆäËû½ÚµãΪ±¸½Úµã £¬ÓÃÓÚÊý¾Ý±¸·ÝºÍ¹ÊÕÏÇл»¡£

½¨ÉèÖ÷½Úµã

Ê×ÏÈ £¬ÔÚÖ÷½ÚµãÉϾÙÐÐÉèÖá£

±à¼­Êý¾Ý¿âÉèÖÃÎļþmy.cnf £¬ÕÒµ½ÒÔϲ¿·Ö£º

[mysqld]
server-id=1
log-bin=mysql-bin

µÇ¼ºó¸´ÖÆ

ÉèÖÃserver-idΪһ¸öΨһµÄÖµ £¬ÒÔ±êʶÖ÷½Úµã¡£

ÖØÆôÊý¾Ý¿âЧÀÍ£º

service mysql restart

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

½¨×°±¸½Úµã

½ÓÏÂÀ´ £¬ÔÚ±¸½ÚµãÉϾÙÐÐÉèÖá£

±à¼­Êý¾Ý¿âÉèÖÃÎļþmy.cnf £¬ÕÒµ½ÒÔϲ¿·Ö£º

[mysqld]
server-id=2
log-bin=mysql-bin

µÇ¼ºó¸´ÖÆ

ÉèÖÃserver-idΪһ¸öΨһµÄÖµ £¬ÒÔ±êʶ±¸½Úµã¡£

ÖØÆôÊý¾Ý¿âЧÀÍ£º

service mysql restart

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÉèÖÃÖ÷±¸Í¬²½

ÔÚÖ÷½ÚµãÉÏÖ´ÐÐÒÔÏÂÏÂÁ

GRANT REPLICATION SLAVE ON *.* TO 'replication_user'@'±¸½ÚµãIP' IDENTIFIED BY 'ÃÜÂë';
FLUSH PRIVILEGES;

µÇ¼ºó¸´ÖÆ

½«replication_userÌ滻ΪÏÖʵµÄÊý¾Ý¿âÓû§Ãû £¬½«±¸½ÚµãIPÌ滻Ϊ±¸½ÚµãµÄÏÖʵIPµØµã £¬²¢ÉèÖÃÃÜÂë¡£

ÔÚ±¸½ÚµãÉÏÖ´ÐÐÒÔÏÂÏÂÁ

CHANGE MASTER TO MASTER_HOST='Ö÷½ÚµãIP', MASTER_USER='replication_user', MASTER_PASSWORD='ÃÜÂë', MASTER_LOG_FILE='Ö÷½ÚµãµÄbinlogÎļþÃû', MASTER_LOG_POS=Ö÷½ÚµãµÄbinlogÎļþλÖÃ;
START SLAVE;

µÇ¼ºó¸´ÖÆ

½«Ö÷½ÚµãIPÌ滻ΪÖ÷½ÚµãµÄÏÖʵIPµØµã £¬½«replication_userºÍÃÜÂëÌ滻ΪÏÖʵµÄÊý¾Ý¿âÓû§ÃûºÍÃÜÂë £¬½«Ö÷½ÚµãµÄbinlogÎļþÃûºÍλÖÃÌ滻ΪÏÖʵֵ¡£

¹ÊÕÏÇл»

ÔÚÖ÷½Úµã±¬·¢¹ÊÕÏʱ £¬ÐèÒªÊÖ¶¯Çл»ÖÁ±¸½Úµã¡£

ÔÚ±¸½ÚµãÉÏÖ´ÐÐÒÔÏÂÏÂÁ

STOP SLAVE;
RESET MASTER;

µÇ¼ºó¸´ÖÆ

ÔÚ±¸½ÚµãÉϱ༭Êý¾Ý¿âÉèÖÃÎļþmy.cnf £¬½«ÒÔÏÂÐÐ×¢Ê͵ô£º

# server-id=2
# log-bin=mysql-bin

µÇ¼ºó¸´ÖÆ

È»ºóÖØÆôÊý¾Ý¿âЧÀÍ£º

service mysql restart

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÏÖÔÚ±¸½Úµã½«³ÉΪеÄÖ÷½Úµã £¬ÆäËû±¸½Úµã¿ÉÒÔƾ֤ÏàͬµÄ°ì·¨ÉèÖÃΪеı¸½Úµã¡£

ËÄ¡¢×ܽá

ͨ¹ýÒÔÉÏ°ì·¨ £¬ÎÒÃÇÀÖ³ÉÉèÖÃÁËÒ»¸ö»ùÓÚÖ÷±¸¸´ÖÆģʽµÄ¸ß¿ÉÓÃÊý¾Ý¿â¼¯Èº £¬È·±£ÁËÊý¾ÝµÄÒ»Á¬¿É¿¿»á¼û¡£Ï£Íû±¾ÎÄÄܶԶÁÕßÔÚLinuxÉÏÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯ÈºÌṩһЩ×ÊÖú¡£ÈôÓÐÒÉÎÊ £¬Çë²Î¿¼Ïà¹Ø¹Ù·½Îĵµ»òÕß×ÉѯרҵÈËÊ¿¡£

ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓÃÊý¾Ý¿â¼¯ÈºµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ