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

MysqlÖ÷´Ó·þÎñÆ÷µÄÅäÖñʼÇ

×¢: ´ÓMySQL´Ó·þÎñÆ÷µÄ°æ±¾²»ÄÜСÓÚÖ÷·þÎñÆ÷µÄ°æ±¾ ʵÑé»·¾³ Master Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.130 Slave Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.132 Ò». MySQLÖ÷·þÎñÆ÷ÅäÖà 1.½¨Á¢ÊÚȨÓû§ Ó÷¨:grant replication slave on *.* to ¡®Óû§Ãû¡¯@'Ö÷»ú¡¯ identified by ¡®ÃÜÂ롯; mysql>grant replication slave on *.* to backup@192.168.128.132 identified by ¡®123¡ä; Ë¢ÐÂȨÏÞ mysql>flush privileges; ¿ÉÒÔÓÃÕâÌõÃüÁî²é¿´mysqlÏÖÔÚÓÐÄÄЩÓû§: mysql>select user,host from mysql.user; 2.±à¼­ÅäÖÃÎļþ/etc/my.cnf # È·±£ÓÐÈçÏÂÐÐ server-id = 1 //Ö÷·þÎñÆ÷µÄidºÅҪΪ1.´Ó·þÎñÆ÷±ÈÖ÷·þÎñÆ÷µÄµÍ. log-bin=mysql-bin binlog-do-db=test //ÐèÒª±¸·ÝµÄÊý¾Ý¿âÃû.ÕâÀïΪtest¿â. Èç¹ûÒª±¸·Ý¶à¸ö¿â¿Éд¶àÐÐ. binlog-ignore-db=mysql //²»ÐèÒª±¸·ÝµÄ¿â.Ò²¿ÉÒÔд¶àÐÐ. ¶þ.MySQL´Ó·þÎñÆ÷ÅäÖà 1.±à¼­/etc/my.cnf server-id=2 log-bin=mysql-bin master-host=192.168.128.130 //mysqlÖ÷·þÎñÆ÷µÄip master-user=backup //Ç°ÃæÖ÷·þÎñÆ÷½¨Á¢µÄÊÚȨÓû§Ãû master-password=123 //Ö÷·þÎñÆ÷ÊÚȨÓû§µÄÃÜÂë master-port=3306 //Ö÷·þÎñÆ÷¶Ë¿Ú replicate-do-db=test //ÐèÒª±¸·ÝµÄÊý¾Ý¿âÃû replicate-ignore-db=mysql //²»ÐèÒª±¸·ÝµÄÊý¾Ý¿â master-connect-retry=60 Èç¹û´Ó·þÎñÆ÷·¢ÏÖÖ÷·þÎñÆ÷¶Ïµô£¬ÖØÐÂÁ¬½ÓµÄʱ¼ä²î(Ãë) Ps:ÐèÒª±¸·ÝµÄÊý¾Ý¿â.Ö÷´Ó·þÎñÆ÷µÄÅäÖÃÀﶼҪдÃ÷.²»È»¾Íû·¨Í¬²½ÁË. ¼ÇµÃÏÈÊÖ¶¯Í¬²½Ò»´ÎÖ÷´Ó·þÎñÆ÷ÖÐÒª±¸·ÝµÄÊý¾Ý¿â£¬Èç¹ûûÓÐÏÈͬ²½Êý¾Ý¿â.ÅäÖÃÍê³ÉºóÒ²²»»áͬ²½.È»ºóÖØÆôÖ÷£¬´Ó·þÎñÆ÷ÈÃÅäÖÃÉúЧ¡£ Èý..ÑéÖ¤ÊÇ·ñÅäÖÃÕýÈ· 1.µÇ¼Ö÷·þÎñÆ÷ÊäÈëÈçÏÂÃüÁî²é¿´Ö÷·þÎñÆ÷µÄÐèÒª±¸·ÝµÄÊý¾Ý¿âÅäÖÃÊÇ·ñÕýÈ·: mysql> show master status; +------------------+----------+--------------+--------------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+--------------------------+ | mysql-bin.000008 | 585 | test,| | +------------------+----------+--------------+--------------------------+ 2.µÇ¼´Ó·þÎñÆ÷ÊäÈëÈçÏÂÃüÁî: mysql> show slave status\G; ÏÔʾÈçÏÂ: *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.50.216 Mast


Ïà¹ØÎĵµ£º

mysql+phpÎÞ·¨Á¬½Ósql£¨Òѽâ¾ö£©

¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔ­À´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾­µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......

MySQL5.1ÄÚ±íתµ½MS SQL£¬±í½á¹¹Ó¦ÈçºÎÉèÖã¿

# MySQL-Front 5.1  (Build 4.2)
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
/*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
/*!40103 SET SQL_NOTES='ON' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */ ......

Ôõô°Ñpowerdesignerµ¼³öµÄsqlÓÃPHPµ¼ÈëMysQLÊý¾Ý¿â

ÎÒÃÇÖªµÀÓÃpowerdesignerµ¼³öµÄsqlÎļþºó׺Ϊ'.sql'£»ÓÃphpmyadminºÜÈÝÒ×µ¼ÈëMysQLÊý¾Ý¿â£¬µ«ÊÇÓÃPHPÔõôµ¼ÈëÊý¾Ý¿âÄØ?
ÎÒÓÃpowerdesignerÉè¼ÆÒ»¸öÊý¾Ý¿âºóµ¼³ösqlÎļþ£¨Ò»¸öͶƱϵͳ£©Îª'vote.sql'£»
ÎļþÄÚÈÝΪ£¨Ò»Ð©sqlÓï¾äºÍ×¢ÊÍ£©£º
        
/*======================= ......

UbuntuÏÂÅäÖÃLAMP£¨Linux+Apache+Mysql+PHP)»·¾³

ÖÕÓڷżÙÁË£¬ÕýÏëÔÚÕâ¸ö¼ÙÆÚÀïѧѧPHP£¬ÓÉÓÚ×Ô¼ºÓõÄÊÇ×ÀÃæ°æµÄUbuntu8.04,ÓÚÊǾÍÏë¼ÜÉèÒ»¸öLAMP»·¾³À´Ñ§PHP£¬Ò²³Ã´Ë»ú»áѧһÏÂPHP·þÎñÆ÷µÄ¼ÜÉè¡£
Ò»¡¢°²×°Ubuntu8.04
ËäȻ˵ÊÇÅäÖÃLAMP»·¾³£¬µ«ÔÚÎÄÕÂÀï²¢²»»á½²ÊöÈçºÎ°²×°Ubuntu8.04,ÒòΪ¹ØÓÚÈçºÎUbuntu8.04ÔÚÍøÉÏÒѾ­ÓкܶàµÄ½Ì³ÌÁË£¬¾ÍËãÊÇÓ²ÅÌ°²×°Ò²ÊÇÒ»¼þºÜ¼òµ¥µÄÊÂÁ ......

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ
ÎÄÕ·ÖÀà:Êý¾Ý¿â
ÔÚÊý¾Ý¿â±í¶ªÊ§»òË𻵵ÄÇé¿öÏ£¬±¸·ÝÄãµÄÊý¾Ý¿âÊǺÜÖØÒªµÄ¡£Èç¹û·¢Éúϵͳ±ÀÀ££¬Äã¿Ï¶¨ÏëÄܹ»½«ÄãµÄ±í¾¡¿ÉÄܶªÊ§×îÉÙµÄÊý¾Ý»Ö¸´µ½±ÀÀ£·¢ÉúʱµÄ״̬¡£±¾ÎÄÖ÷Òª¶ÔMyISAM±í×ö±¸·Ý»Ö¸´¡£
 
±¸·Ý²ßÂÔÒ»£ºÖ±½Ó¿½±´Êý¾Ý¿âÎļþ£¨²»ÍƼö£©
±¸·Ý²ßÂÔ¶þ£ºÊ¹ÓÃmysqlhotcopy±¸·ÝÊý¾Ý¿â£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ