{"id":435,"date":"2012-06-12T17:05:58","date_gmt":"2012-06-12T08:05:58","guid":{"rendered":"http:\/\/systemdev.comsys-blog.com\/?p=435"},"modified":"2012-06-12T17:05:58","modified_gmt":"2012-06-12T08:05:58","slug":"zabbix%e3%81%aemysql%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9%e3%81%8c%e5%a3%8a%e3%82%8c%e3%81%9f%e3%80%82%e3%81%be%e3%82%81%e3%81%ab%e3%83%90%e3%83%83%e3%82%af%e3%82%a2%e3%83%83%e3%83%97","status":"publish","type":"post","link":"https:\/\/tamura.jp\/?p=435","title":{"rendered":"zabbix\u306eMySql\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u58ca\u308c\u305f\u3002\u307e\u3081\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u3001\u5727\u7e2e\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002"},"content":{"rendered":"<p>Zabbix\u3067\u30b5\u30fc\u30d0\u3092\u76e3\u8996\u3057\u3066\u3044\u3066\u3044\u3066\u3001\u3044\u305f\u3063\u3066\u5feb\u9069\u306b\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u3093\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u643a\u5e2f\u30e1\u30fc\u30eb\u306b\u5c4a\u3044\u305f\u3002<\/p>\n<p>\u300cZabbix database is down.\u300d<\/p>\n<p>mysql\u304c\u58ca\u308c\u305f\u307f\u305f\u3044\u3002<\/p>\n<p>\/var\/lib\/mysql\/ibdata1 \u306e\u30b5\u30a4\u30ba\u304c\uff16\u30ae\u30ac\u304f\u3089\u3044\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<p>\u4fee\u5fa9\u3057\u3066\u3082\u3069\u3046\u3057\u3066\u3082\u3060\u3081\u306a\u306e\u3067\u3001\u7d50\u5c40ZABBIZ\u30b5\u30fc\u30d0\u306e\u518d\u69cb\u7bc9\u3092\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3055\u307c\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\n\u305b\u3063\u304b\u304f\u3060\u304b\u3089\u305d\u306e\u6642\u5727\u7e2e\u3082\u884c\u3046\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u7121\u7406\u304c\u3042\u308b\u304c\u3001\u305d\u306e\u6642\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3002<br \/>\nroot_passwd=mysql\u3000\uff1c\uff0d\u3053\u3053\u3067\u306fmysql\u306eroot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<p>[TEXT]<br \/>\n#!\/bin\/sh<br \/>\nroot_passwd=mysql<br \/>\nprefix=&#8221;mysql.mysqldump&#8221;<br \/>\nnowtime=&#8221;$(date +%Y%m%d%H%M%S)&#8221;<br \/>\nbackup_file=&#8221;${prefix}_${nowtime}&#8221;<br \/>\ncd \/backup<\/p>\n<p>\/etc\/init.d\/httpd stop<br \/>\n\/etc\/init.d\/zabbix-server stop<br \/>\nmysqldump -u root -p${root_passwd} -x &#8211;all-database &gt; ${backup_file}<br \/>\nmysqladmin -u root -p${root_passwd} -f drop zabbix<br \/>\n\/etc\/init.d\/mysqld stop<br \/>\nrm -rf \/var\/lib\/mysql\/ib_logfile0<br \/>\nrm -rf \/var\/lib\/mysql\/ib_logfile1<br \/>\nrm -rf \/var\/lib\/mysql\/ibdata1<br \/>\n\/etc\/init.d\/mysqld start<br \/>\nmysqladmin -u root -p${root_passwd} create zabbix<br \/>\nmysql -u root -p${root_passwd} zabbix &lt; ${backup_file}<br \/>\n\/etc\/init.d\/zabbix-server start<br \/>\n\/etc\/init.d\/httpd start<br \/>\n[\/TEXT]<\/p>\n<p>\u3068\u3053\u308d\u3067\u3001\/etc\/my.cnf \u306b innodb_file_per_table \u3092\u8ffd\u52a0\u3057\u305f\u3002<br \/>\n\u305d\u306e\u6642\u306emy.cnf \u304c\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n<p>[TEXT]<br \/>\n[mysqld]<br \/>\ninnodb_file_per_table<br \/>\ndatadir=\/var\/lib\/mysql<br \/>\nsocket=\/var\/lib\/mysql\/mysql.sock<br \/>\nuser=mysql<br \/>\n# Default to using old password format for compatibility with mysql 3.x<br \/>\n# clients (those using the mysqlclient10 compatibility package).<br \/>\nold_passwords=1<\/p>\n<p>default-character-set=utf8<br \/>\nskip-character-set-client-handshake<\/p>\n<p># Disabling symbolic-links is recommended to prevent assorted security risks;<br \/>\n# to do so, uncomment this line:<br \/>\n# symbolic-links=0<\/p>\n<p>[mysqld_safe]<br \/>\nlog-error=\/var\/log\/mysqld.log<br \/>\npid-file=\/var\/run\/mysqld\/mysqld.pid<br \/>\n[\/TEXT]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix\u3067\u30b5\u30fc\u30d0\u3092\u76e3\u8996\u3057\u3066\u3044\u3066\u3044\u3066\u3001\u3044\u305f\u3063\u3066\u5feb\u9069\u306b\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u3093\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u643a\u5e2f\u30e1\u30fc\u30eb\u306b\u5c4a\u3044\u305f\u3002 \u300cZabbix database is down.\u300d mysql\u304c\u58ca\u308c\u305f\u307f\u305f\u3044\u3002 \/var\/lib\/mys [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,43],"tags":[],"class_list":["post-435","post","type-post","status-publish","format-standard","hentry","category-19","category-zabbix"],"_links":{"self":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts\/435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":0,"href":"https:\/\/tamura.jp\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions"}],"wp:attachment":[{"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tamura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}