ͬ²½Æô¶¯Ñ¡Ïî(mysql ͬ²½)
²»¹ÜÊÇmaster»¹ÊÇslave£¬¶¼ÒªÉ趨 server-id Ñ¡ÏîÀ´È·¶¨Ê¹ËüÃǶ¼Óи÷×ÔΨһµÄͬ²½ID¡£±ØÐëÑ¡Ôñ 1 µ½ 2^32-1 Ö®¼äµÄÕýÕûÊý¡£ÀýÈ磺 server-id=3¡£
¹ØÓÚmaster·þÎñÆ÷ÉÏ¿ÉÓÃÓÚ¿ØÖƶþ½øÖÆÈÕÖ¾¼Ç¼µÄÑ¡ÏîÏêϸÃèÊöÇë¿´"5.9.4 The Binary Log"¡£
ϱíÃèÊöÁËslaveͬ²½¿ÉÓõÄÑ¡Ï¿ÉÒÔÔÚÃüÁîÐлòÕßÅäÖÃÎļþÖÐÉ趨ËüÃÇ¡£
һЩslaveͬ²½Ñ¡ÏîÒÔÌض¨µÄ·½Ê½À´´¦Àí£¬ÔÚslaveÆô¶¯Ê±£¬Èç¹û´æÔÚ `master.info` Îļþ²¢ÇÒ°üº¬ÕâЩѡÏÄÇôslave½«ÂÔ¹ýËüÃÇ¡£ÕâЩѡÏîÈçÏ£º
--master-host
--master-user
--master-password
--master-port
--master-connect-retry
´ÓMySQL 4.1.1¿ªÊ¼£¬Ò»ÏÂÑ¡ÏîÒ²°´ÕÕÉÏÊö·½Ê½ÌØÊâ´¦Àí£º
--master-ssl
--master-ssl-ca
--master-ssl-capath
--master-ssl-cert
--master-ssl-cipher
--master-ssl-key
ÔÚMySQL 4.1.1ÖУ¬ `master.info` ÎļþµÄ¸ñʽ¸Ä±äÁËÒÔ°üº¬ÏàÓ¦µÄSSLÑ¡Ïî¡£ÁíÍ⣬MySQL 4.1.1Îļþ¸ñʽ»¹°üÀ¨ÁËÔÚµÚÒ»ÐÐÖеÄÎļþ×ÜÐÐÊý¡£Èç¹û´Ó¾É°æ±¾Éý¼¶µ½4.1.1£¬ÄÇô·þÎñÆ÷Æô¶¯Ê±»á×Ô¶¯Éý¼¶ `master.info` Ϊеĸñʽ¡£²»¹ý£¬Èç¹ûÊÇ´Ó4.1.1½µ¼¶µ½¾É°æ±¾£¬¾ÍÐèÒªÔÚϵͳµÚÒ»´ÎÆô¶¯Ê±ÊÖ¹¤É¾³ýÎļþµÄµÚÒ»ÐС£×¢Ò⣬ÕâÖÖÇé¿öÏ£¬±»½µ¼¶µÄ·þÎñÆ÷¾Í²»ÄÜÔÙʹÓÃSSLÑ¡ÏîÁ¬½Óµ½masterÁË¡£
slaveÆô¶¯Ê±Èç¹û²»´æÔÚ `master.info` Îļþ£¬Ëü¾ÍʹÓÃÔÚÃüÁîÐлòÕßÅäÖÃÎļþÖÐÖ¸¶¨µÄ²ÎÊýÖµÀ´Æô¶¯¡£ÕâÔÚÿ´ÎµÚÒ»´ÎÆô¶¯slave·þÎñÆ÷ʱ¶¼ÊÇÕâÑù£¬»òÕßÖ´ÐÐ RESET SLAVE Óï¾ä¹Ø±ÕÇÒÖØÆôslaveÖ®ºó¡£
slaveÆô¶¯Ê±Èç¹û´æÔÚ `master.info` Îļþ£¬ÄÇôËü¾ÍÂÔ¹ýÕâЩѡÏ¶øÊÇÖ±½Ó¶ÁÈ¡ `master.info` ÎļþÖеÄÖµ¡£
Èç¹ûÖØÆôsalveʱʹÓõÄÑ¡ÏîÖµºÍ `master.info` ÖеIJ»Ò»Ñù£¬ÄÇôÕâ¸öеÄÖµ²»»áÉúЧ£¬ÒòΪslave·þÎñÆ÷»¹ÊÇÕÕÑùÖ»¶ÁÈ¡ `master.info` Îļþ¡£ÏëҪʹÓò»Í¬µÄÑ¡ÏîÖµ£¬¿ÉÒÔÔÚɾ³ý `master.info` ºóÖØÆôslave»òÕßʹÓà CHANGE MASTER TO Óï¾ä(ÍƼö)ÖØÖÃÑ¡ÏîÖµ¡£
¼Ù¶¨ÔÚ `my.cnf` É趨ÁËÒÔÏÂÑ¡ÏîÖµ£º
[mysqld]
master-host=some_host
µÚÒ»´ÎÆô¶¯slaveµÄʱºò£¬Ëü´Ó `my.cnf` ÖжÁÈ¡Ñ¡ÏîÖµ£¬È»ºóÔÙ°ÑËüÃDZ£´æÔÚ `master.info` ÖС£Ï´ÎÖØÆôslaveʱ£¬Ëü¾ÍÖ»¶ÁÈ¡ `master.info` µÄÄÚÈݶøÂÔ¹ý `my.cnf` ÖеÄÑ¡ÏîÖµÁË¡£ÆóͼÐÞ¸Ä `my.cnf` À´¸Ä±äͬ²½Ñ¡ÏîÊDz»¿ÉÐеģ¬²»¹ý¿ÉÒÔͨ¹ýÖ´ÐÐ CHANGE MASTER TO Óï¾äÀ´ÊµÏÖ£º
ÓÉÓÚ·þÎñÆ÷ÈÏΪ `master.info` µÄÓÅÏȼ¶±ÈÅäÖÃÎļþ¸ß£¬Òò´Ë½¨Òé¸ù±¾²»ÒªÔÚÆô¶¯Ê±¸½¼Óͬ²½Ñ¡Ï¶øÖ»Óà CHANGE MASTER TO Óï¾ä¡£Ïê
Ïà¹ØÎĵµ£º
ÓÐʱºòΪÁË·½±ã£¬ÀûÓÃevent/triggerµ÷ÓÃϵͳÍⲿÃüÁ¿ÉÒòΪ°²È«ÎÊÌ⣬mysql×ÔÉí²¢Ã»ÓÐÌṩÏà¹ØÃüÁÕâÀïÌṩ¸öµ÷ÓÃϵͳÃüÁîµÄ×Ô¶¨Ò庯Êýmylab_sys_exec
soÎļþÏÂÔØ:mylab_sys_exec.so ( mysql5.1.34 ²âÊÔͨ¹ý)
¼ÓÔØ:
CREATE FUNCTION mylab_sys_exec RETURNS INTEGER SONAME "mylab_sys_exec.so";
ʹÓÃ:
SELECT myl ......
Ä¿Ç°LAMP (Linux + Apache + MySQL + PHP) ½ü¼¸ÄêÀ´·¢Õ¹Ñ¸ËÙ£¬ÒѾ³ÉΪWeb ·þÎñÆ÷µÄÊÂʵ±ê×¼¡£LAMP
Õâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ã µÄË ......
1¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
2¡¢HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý
3¡¢HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
Ŀ¼ɾ³ý ......
·/etc/my.cnfÊÇĬÈϵÄMySQLÅäÖÃÎļþ¡£Ó¦¸Ã¶ÔÕâ¸öÎļþÅäÖÃÐ޸ġ£ËüÊÇΪѧϰĿµÄ¶øÉè¼ÆµÄ¡£
·my-small.cnfÊÇΪÁËСÐÍÊý¾Ý¿â¶øÉè¼ÆµÄ¡£²»Ó¦¸Ã°ÑÕâ¸öÄ£ÐÍÓÃÓÚº¬ÓÐһЩ³£ÓÃÏîÄ¿µÄÊý¾Ý¿â¡£
·my-medium.cnfÊÇΪÖеȹæÄ£µÄÊý¾Ý¿â¶øÉè¼ÆµÄ¡£Èç¹ûÄãÕýÔÚÆóÒµÖÐʹÓÃRHEL,¿ÉÄÜ»á±ÈÕâ¸ö²Ù×÷ϵͳµÄ×îСRAMÐèÇó(25 ......
°´ÕÕ¹Ù·½ÌṩµÄ“UCenter 1.5.0 °²×°Í¼ÎĽ̳̔£¬ÎÒ¿ªÊ¼×°ÉÏphp5,mysql5,apache2.2£¬½á¹ûÔÚhttp://127.0.0.1/ucenter/install/index.phpʱÓöµ½ÁËÁîÈËÓôÃƵÄÒ»¿Ì£¬
²é²é×ÊÁÏÒ»¿´£¬ÓкܶàÅóÓѶ¼Óöµ½ÀàËÆÇé¿ö£¬¶øÇÒÎʵÄÌû×Óµ½ÏÖÔÚ»¹Ã»Óиø»Ø£¬ÐÄÀíÄÉÃÆѽ£¬ÎªÉ¶UcenterµÄÌṩ¹«Ë¾“¿µÊ¢´´Ï딵Ŀª·¢ÈËÔ±²» ......