nagios¼à¿ØmysqlÖ÷´Ó¸´ÖÆ
nagios¼à¿ØmysqlÖ÷´Ó¸´ÖÆ
×÷ÕߣºÌïÒÝ(sery@163.com
)
ÆðÒò£ºnagios¿ÉÄÜ¼à¿Øµ½mysql·þÎñµÄÔËÐÐÇé¿ö£¬µ«È·²»ÄÜ¼à¿ØmysqlµÄÖ÷´Ó¸´ÖÆÊÇ·ñÕý³££ºÓÐʱºò£¬Í¬²½ÒѾֹͣ£¬µ«¹ÜÀíÈËԱȴ²»ÖªµÀ¡£
ÏÂÊÖ´¦£ºµÇ½mysql´Ó·þÎñÆ÷£¬Í¨¹ýÖ´ÐÐ mysql> show slave status\G
²é¿´ÆäÊä³ö£¬¼´¿ÉÅж¨Ö÷´Ó¸´ÖÆÊÇ·ñÕý³£¡£ÏÂÃæÊÇij¸ö´Ó·þÎñÆ÷µÄÊä³ö£º
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.93.16
Master_User: rep1
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 1752541
Relay_Log_File: hy-mysql3-relay-bin.000088
Relay_Log_Pos: 2339
Relay_Master_Log_File: mysql-bin.000004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Õâ¸öÊä³ö£¬×î¹Ø¼ü´¦¾ÍÊÇ"Slave_IO_Running: Yes
“ºÍ“Slave_SQL_Running: Yes
”£¬ÕâÁ½¸öֵȫÊÇ"Yes"¾Í±íÃ÷Ö÷´Ó¸´ÖÆÕý³££¬·ñÔò¾ÍÊÇÓÐÎÊÌâ¡£
²Ù×÷²½Ö裺
1¡¢ÔÚÖ÷Êý¾Ý¿â·þÎñÆ÷Ôö¼ÓÒ»¸öÓû§£¬¸øÓè½ÏµÍµÄȨÏÞ£¬²Ù×÷Ϊ
mysql > grant Replication client on *.* to 'nagios'@'%'
identified by 'nagios';
mysql> flush privileges;
2¡¢µÇ½´Ó·þÎñÆ÷Ñé
Ïà¹ØÎĵµ£º
MySQL5.X¶¼ÒѾ·¢²¼ºÃ¾ÃÁË£¬µ«ÊÇ»¹ÓкܶàÈËÈÏΪMySQLÊDz»Ö§³ÖÊÂÎñ´¦ÀíµÄ£¬Õâ²»µÃ²»¹ÖËûÃÇÊǹª¹ÑÎŵ쬯äʵ£¬Ö»ÒªÄãµÄMySQL°æ±¾
Ö§³ÖBDB»òInnoDB±íÀàÐÍ£¬ÄÇôÄãµÄMySQL¾Í¾ßÓÐÊÂÎñ´¦ÀíµÄÄÜÁ¦¡£ÕâÀïÃæ£¬ÓÖÒÔInnoDB±íÀàÐÍÓõÄ×î¶à£¬ËäÈ»ºóÀ´·¢ÉúÁËÖîÈçOracleÊÕ
¹ºInnoDBµÈÁîMySQL²»Ë¬µÄÊÂÇ飬µ«ÄÇЩÉÌÒµÉϵĶ·ÕùÓë¼¼ÊõÎ޹أ ......
linux
mysql
°²×°½éÉÜ:
linux
·þÎñÆ÷ RedHat 5.0.server.
MySQL
°æ±¾:
ÏÂÔØµØÖ·Á´½Ó:http://dev.mysql
.com/downloads/mysql
/5.1.html
MySQL
·þÎñ¶Ë:MySQL
-server-community-5.1.38-0.rhel5.i386.rpm
MySQL
¿Í»§¶Ë:MySQL
-client-community-5.1.38-0.rhel5.i386.rpm
1 °²×°²½ÖèÊ×ÏȼÓÔØ¹âÇý ......
1¡¢±à¼MySQLÅäÖÃÎļþ£º
windows»·¾³ÖУº%MySQL_installdir%\my.ini¡¡//Ò»°ãÔÚMySQL°²×°Ä¿Â¼ÏÂÓÐmy.ini¼´MySQLµÄÅäÖÃÎļþ¡£
linux»·¾³ÖУº/etc/my.cnf
ÔÚ[MySQLd]ÅäÖöÎÌí¼ÓÈçÏÂÒ»ÐУº
skip-grant-tables
±£´æÍ˳ö±à¼¡£
2¡¢È»ºóÖØÆôMySQL·þÎñ
windows»·¾³ÖУº
net stop MySQL
net start MySQL
linux»·¾³ÖУº
/e ......
InnoDB ¸ø MySQL ÌṩÁ˾ßÓÐÊÂÎñ(commit)¡¢»Ø¹ö(rollback)ºÍ±ÀÀ£ÐÞ¸´ÄÜÁ¦(crash recovery capabilities)¡¢¶à°æ±¾²¢·¢¿ØÖÆ(multi-versioned concurrency control)µÄÊÂÎñ°²È«(transaction-safe (ACID compliant))ÐÍ±í¡£InnoDB ÌṩÁËÐм¶Ëø(locking on row level)£¬ÌṩÓë Oracle ÀàËÆµÄ²»¼ÓËø¶ÁÈ¡(non-locking read in SELEC ......
http://hi.baidu.com/ubuntu2me/blog/item/e1bd54de9a428f1862279828.html
¡¾IT168¼¼ÊõÎĵµ
¡¿ÈκÎÒ»ÖÖÊý¾Ý¿âÖУ¬¶¼Óи÷ÖÖ¸÷ÑùµÄÈÕÖ¾¡£MysqlÒ²²»ÀýÍ⣬ÔÚMysqlÖÐÓÐ4ÖÖ²»Í¬µÄÈÕÖ¾¡¢·Ö±ð´íÎóÈÕÖ¾¡¢¶þ½øÖÆÈÕÖ¾¡¢²éѯÈÕÖ¾ºÍÂý²éѯÈÕÖ¾¡£ÕâЩÈÕÖ¾¼Ç¼×ÅMysqlÊý¾Ý¿â²»Í¬·½ÃæµÄ×Ù¼£¡£ÏÂÎĽ«½éÉÜÕâ4ÖÖ²»Í¬µÄÈÕÖ¾×÷ÓúÍÓÃ;¡£
¡¡¡ ......