{"id":60,"date":"2013-04-27T21:08:51","date_gmt":"2013-04-27T12:08:51","guid":{"rendered":"http:\/\/yokensaka.com\/centos\/?p=60"},"modified":"2017-10-10T07:36:19","modified_gmt":"2017-10-09T22:36:19","slug":"mysqldump%e3%81%ae%e8%ad%a6%e5%91%8a%e3%83%a1%e3%83%83%e3%82%bb%e3%83%bc%e3%82%b8","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/centos\/?p=60","title":{"rendered":"mysqldump\u306e\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8"},"content":{"rendered":"<p>Cron\u304b\u3089mysqldump\u306e\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30e1\u30fc\u30eb\u304c\u304c\u5c4a\u3044\u305f\u3002<br \/>\nCron <root@server1> \/root\/mysqldump.sh ; \/root\/backup.sh<br \/>\n&#8212; Warning: Skipping the data of table mysql.event. Specify the &#8211;events option explicitly.<br \/>\n\u5b9f\u969b\u3084\u3063\u3066\u307f\u308b\u3068\u78ba\u304b\u306b\u8b66\u544a\u304c\u51fa\u305f\u3002<\/p>\n<pre>[root@server1 ~]# \/root\/mysqldump.sh\r\n-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.<\/pre>\n<p>\u73fe\u5728\u306emysql\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8abf\u3079\u308b<\/p>\n<pre>[root@server1 ~]#  yum info mysql\r\nLoaded plugins: fastestmirror, priorities, refresh-packagekit, security\r\nLoading mirror speeds from cached hostfile\r\nepel\/metalink                                                                | 3.2 kB     00:00\r\n* base: mirror.fairway.ne.jp\r\n* centosplus: ftp.tsukuba.wide.ad.jp\r\n* epel: ftp.iij.ad.jp\r\n* extras: mirror.fairway.ne.jp\r\n* updates: mirrors.neusoft.edu.cn\r\nbase                                                                         | 3.7 kB     00:00\r\ncentosplus                                                                   | 3.5 kB     00:00\r\nepel                                                                         | 3.9 kB     00:00\r\nepel\/primary_db                                                              | 5.0 MB     00:00\r\nextras                                                                       | 3.5 kB     00:00\r\nupdates                                                                      | 3.5 kB     00:00\r\n90 packages excluded due to repository priority protections\r\nInstalled Packages\r\nName        : mysql\r\nArch        : x86_64\r\nVersion     : 5.1.69\r\nRelease     : 1.el6_4\r\nSize        : 2.4 M\r\nRepo        : installed\r\nFrom repo   : updates\r\nSummary     : MySQL client programs and shared libraries\r\nURL         : http:\/\/www.mysql.com\r\nLicense     : GPLv2 with exceptions\r\nDescription : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a\r\n: client\/server implementation consisting of a server daemon (mysqld)\r\n: and many different client programs and libraries. The base package\r\n: contains the standard MySQL client programs and generic MySQL files.<\/pre>\n<p>\u6700\u65b0\u7248\u306fmysql5.6\u7cfb\u3060\u304c\u3001CentOS6.4\u306fmysql5.1\u7cfb\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u6700\u65b0\u7248\u306emysql5.6\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u306f\u6b21\u56de\u306b\u6301\u3061\u8d8a\u3057\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u3001\u4eca\u56de\u306f\u8b66\u544a\u304c\u51fa\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3060\u3051\u306b\u3059\u308b\u3002\u8b66\u544a\u306f\u3001events option\u3092\u304d\u3061\u3093\u3068\u6307\u5b9a\u3057\u306a\u3055\u3044\u3068\u306e\u8b66\u544a\u306a\u306e\u3067\u3001mysqldump.sh\u3092\u66f8\u304d\u306a\u304a\u3059\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<pre>[root@server1 ~]# vi mysqldump.sh\r\n#! \/bin\/sh\r\nmysqldump mysql -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/mysqldump.sql\r\nmysqldump fc -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/fcdump.sql\r\nmysqldump nucleus -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/nucleusdump.sql\r\nmysqldump taka -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/takadump.sql\r\nmysqldump centos -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/centosdump.sql\r\n\u3092\u4e0b\u306e\u3088\u3046\u306b --events \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\r\n#! \/bin\/sh\r\nmysqldump --events -uroot mysql -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/mysqldump.sql\r\nmysqldump --events -uroot fc -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/fcdump.sql\r\nmysqldump --events -uroot nucleus -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/nucleusdump.sql\r\nmysqldump --events -uroot taka -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/takadump.sql\r\nmysqldump --events -uroot centos -uroot -p\u30d1\u30b9\u30ef\u30fc\u30c9 --default-character-set=binary > \/backup\/centosdump.sql<\/pre>\n<p>\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u51fa\u306a\u304f\u306a\u3063\u305f\u3002<\/p>\n<pre>[root@server1 ~]# \/root\/backup.sh\r\n[root@server1 ~]#<\/pre>\n<p>\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30822.6.32-358.2.1.el6.centos.plus.x86_64\u304b\u30892.6.32-358.6.1.el6.centos.plus.x86_64\u306b\u4e0a\u304c\u3063\u3066\u305f\u3002\u30ab\u30fc\u30cd\u30eb\u306f\u518d\u8d77\u52d5\u3057\u306a\u3044\u3068\u53cd\u6620\u3055\u308c\u306a\u3044\u306e\u3067\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u306b\u30fb\u30fb\u30fb\u3068\u3053\u308d\u304c\u306a\u304b\u306a\u304b\u8d77\u52d5\u3057\u306a\u3044\u306e\u3067\u7126\u3063\u305f\uff01\uff01\u96fb\u6e90\u5165\u308c\u76f4\u3057\u3067\u8d77\u52d5\u51fa\u6765\u305f\u304c\u3001\u3044\u3064\u3082\u306e\u3053\u3068\u306a\u304c\u3089\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u2192\u518d\u8d77\u52d5\u306f\u3061\u3083\u3093\u3068\u8d77\u52d5\u3057\u3066\u304f\u308c\u308b\u304b\u4e0d\u5b89\u306b\u306a\u308b\u3002<\/p>\n<pre>[root@server1 ~]# uname --kernel-release\r\n2.6.32-358.6.1.el6.centos.plus.x86_64\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Cron\u304b\u3089mysqldump\u306e\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30e1\u30fc\u30eb\u304c\u304c\u5c4a\u3044\u305f\u3002 Cron \/ &hellip; <a href=\"http:\/\/yokensaka.com\/centos\/?p=60\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60"}],"version-history":[{"count":2,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":563,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions\/563"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}