{"id":419,"date":"2010-11-21T21:03:08","date_gmt":"2010-11-21T12:03:08","guid":{"rendered":"https:\/\/www.jaswill.co.jp\/blog\/2010\/11\/21\/centos54mysql55\/"},"modified":"2010-11-21T21:03:08","modified_gmt":"2010-11-21T12:03:08","slug":"centos54mysql55","status":"publish","type":"post","link":"https:\/\/www.jaswill.co.jp\/blog\/2010\/11\/21\/centos54mysql55\/","title":{"rendered":"CentOS5.4\u306bMySQL5.5\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30e1\u30e2"},"content":{"rendered":"<p>\u6700\u8fd1\u3001\u30b5\u30fc\u30d0\u69cb\u7bc9\u7cfb\u306e\u4ed5\u4e8b\u304c\u591a\u3044\u306e\u3067\u3001\u81ea\u5b85\u3067\u306e\u691c\u8a3c\u7528\u306b\u30cd\u30c3\u30c8\u30d6\u30c3\u30af\u3092\u8cfc\u5165\u3057\u3001<br \/>CentOS\u3092\u30a4\u30f3\u30b9\u30b3\u3057\u3066\u30b7\u30b3\u30b7\u30b3\u3044\u3058\u304f\u3063\u3066\u307e\u3059\u3002<br \/><span class=\"mt-enclosure mt-enclosure-image\"><img loading=\"lazy\" decoding=\"async\" alt=\"PB218734.JPG\" src=\"https:\/\/www.jaswill.co.jp\/member\/2010\/11\/21\/images\/PB218734.JPG\" class=\"mt-image-none\" height=\"343\" width=\"423\" \/><\/span><\/p>\n<p>\u30cd\u30c3\u30c8\u30d6\u30c3\u30af\u306f\u3001\u30b9\u30da\u30c3\u30af\u304c\u4f4e\u3044\u3067\u3059\u304c\u500b\u4eba\u7684\u306aLinux\u306e\u691c\u8a3c\u7528\u306b\u306f\u6700\u9069\u306e\u30de\u30b7\u30f3\u3067\u3059\u3002<br \/>\u30fb\u521d\u671f\u8cbb\u7528\u304c\u5b89\u3044\uff083\u4e07\u304f\u3089\u3044\uff09\u3002<br \/>\u30fb\u7dad\u6301\u8cbb\u304c\u683c\u5b89\uff08\u96fb\u6c17\u4ee3\u304c1\u30f6\u6708\u3064\u3051\u3063\u3071\u306a\u3057\u3067700\u5186\u304f\u3089\u3044\uff09\u3002<br \/>\u30fb\u9759\u304b\uff08\u30d5\u30a1\u30f3\u3084\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u306e\u97f3\u304c\u307b\u3068\u3093\u3069\u7121\u3044\uff09\u3002<\/p>\n<p>\u305d\u3093\u306a\u4e2d\u3001MySQL\u3092\u4f7f\u3063\u305f\u4ed5\u4e8b\u304c\u306f\u3058\u307e\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u8272\u3005\u3068\u30a4\u30b8\u304f\u308a\u307e\u308f\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u4e2d\u3067\u611f\u3058\u305f\u306e\u304c\u3001\u30c7\u30fc\u30bf\u4ef6\u6570\u304c\u591a\u304f\u306a\u308b\u3068\uff0810\u4e07\u4ef6\u4ee5\u4e0a\uff09\u3001SQL\u3067\u306e\u30c7\u30fc\u30bf\u691c\u7d22\u304c\u975e\u5e38\u306b\u91cd\u304f\u306a\u308b\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u3069\u3046\u3082\u30c6\u30fc\u30d6\u30eb\u7d50\u5408\u3059\u308b\u3068\u304d\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u308b\u3002<br \/>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u9069\u5207\u306b\u8cbc\u3063\u3066\u3082\u6539\u5584\u3055\u308c\u306a\u3044\u306e\u3067\u30cd\u30c3\u30c8\u3067\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u3069\u3046\u3082MySQL\u306f\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306e\u6027\u80fd\u304c\u3042\u307e\u308a\u3088\u304f\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u73fe\u5728MySQL\u306e\u6b63\u5f0f\u30ea\u30ea\u30fc\u30b9\u7248\u306f\u30d0\u30fc\u30b8\u30e7\u30f35.1\uff082010\u5e7411\u670820\u65e5)\u3067\u3059\u304c\u3001<br \/>\u958b\u767a\u30d0\u30fc\u30b8\u30e7\u30f3\u306eMySQL5.5\u3067\u3001\u304b\u306a\u308a\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u60c5\u5831\u304c\u3042\u3063\u305f\u306e\u3067\u30a4\u30f3\u30b9\u30b3\u3057\u3066\u307f\u305f\u306e\u3067\u30e1\u30e2\u3057\u307e\u3059\u3002<\/p>\n<p>CentOS\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u306b\u300cyum\u300d\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u5229\u7528\u3057\u30a4\u30f3\u30b9\u30b3\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001yum\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u306f\uff2dySQL5.5\u3092\u30a4\u30f3\u30b9\u30b3\u3067\u304d\u306a\u3044\u306e\u3067\u3001<br \/>remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3044\u30a4\u30f3\u30b9\u30b3\u3059\u308b\u6e96\u5099\u3092\u3057\u307e\u3059\u3002<b><\/p>\n<p>\u2460remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001RPM\u306b\u30a4\u30f3\u30b9\u30b3\u3002<\/b><\/p>\n<pre class=\"code\">wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-5.rpm <br \/>wget http:\/\/download.fedora.redhat.com\/pub\/epel\/5\/x86_64\/epel-release-5-4.noarch.rpm <br \/>rpm -Uvh epel-release-5-4.noarch.rpm remi-release-5.rpm<\/pre>\n<p><b>\u2461remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u304d\u308b\u306e\u3067\u3001\u7de8\u96c6\u3059\u308b\u3002<\/b><\/p>\n<pre class=\"code\">\uff56i \/etc\/yum.repos.d\/remi.repo\npriority=1<br \/>\u203b\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u756a\u4e0b\u306b\u8ffd\u52a0<\/pre>\n<p><b>\u2462\u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3002<\/b><\/p>\n<pre class=\"code\">mysqldump \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9 --opt  &gt; \u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u540d<\/pre>\n<p><b>\u2463\u65e2\u5b58\u306eMySQL\u3092\u524a\u9664<\/b><\/p>\n<pre class=\"code\">yum remove mysql mysql-server mysql-libs<\/pre>\n<p><b>\u2464\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u524a\u9664\uff08\u30ea\u30cd\u30fc\u30e0\u3057\u3066\u4e00\u5fdc\u53d6\u3063\u3066\u304a\u304f\uff09<\/b><\/p>\n<pre class=\"code\">mv mysql _mysql<br \/>\u203b\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u3057\u305f\u307e\u307e\u30a4\u30f3\u30b9\u30b3\u3067\u304d\u307e\u3059\u304c\u3001\u30c7\u30fc\u30bf\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u9055\u3046\u305f\u3081\u304b\u3001\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u3001\u60a9\u3080\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u6d88\u3057\u307e\u3057\u3087\u3046\u3002<br \/><\/pre>\n<p><b>\u2465MySQL5.5\u3092\u30a4\u30f3\u30b9\u30b3\u3002<\/b><\/p>\n<pre class=\"code\">yum --enablerepo=remi-test install mysql mysql-server<\/pre>\n<pre class=\"code\">yum --enablerepo=remi install  mysqlclient15<br \/>\u203blibmysqlclient15\u304c\u7121\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3089\u3001\u307e\u305a\u4e0a\u8a18\u3092\u30a4\u30f3\u30b9\u30b3\u3059\u308b\u3002<br \/><\/pre>\n<p><b>\u2466\u6b63\u5e38\u30a4\u30f3\u30b9\u30b3\u5f8c\u3001MySQL\u3092\u8d77\u52d5\u3002<\/b><\/p>\n<pre class=\"code\">\/etc\/init.d\/mysqld start<\/pre>\n<p><b>\u2467MySQL\u306b\u30ed\u30b0\u30a4\u30f3\u3002<\/b><\/p>\n<pre class=\"code\">mysql -u root -p<br \/>\u203b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u307e\u3060\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u306f\u4f55\u3082\u5165\u529b\u305b\u305a\u306b\u30a8\u30f3\u30bf\u30fc<br \/><\/pre>\n<p><b>\u2468\u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u30675.5\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u3002<\/b><\/p>\n<pre class=\"code\">Server version: 5.5.7-rc MySQL Community Serve<\/pre>\n<p><b>\u2469\u4e00\u5ea6\u3001MySQL\u3092\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u3001\u4ee5\u524d\u306e\u30c7\u30fc\u30bf\u3092\u30ea\u30b9\u30c8\u30a2\u3059\u308b\uff08\u5b8c\u4e86\uff09\u3002<\/b><\/p>\n<pre class=\"code\">exit;\nmysql -u root -p \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d &lt; \u30c0\u30f3\u30d7\u30d5\u30a1\u30a4\u30eb\u540d<br \/>\u203b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30ea\u30b9\u30c8\u30a2\u524d\u306b\u624b\u52d5\u3067\u4f5c\u3063\u3066\u304a\u304f\u3002<br \/><\/pre>\n<p><b>\u246a\u305d\u306e\u4ed6\uff08\u5916\u90e8\u304b\u3089MySQL\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u30e6\u30fc\u30b6\u4f5c\u6210\uff09\u3002<\/b><\/p>\n<pre class=\"code\">GRANT ALL PRIVILEGES ON *.* TO \u30e6\u30fc\u30b6\u540d@'%' IDENTIFIED BY '\u30d1\u30b9\u30ef\u30fc\u30c9' WITH GRANT OPTION;<\/pre>\n<p><b>\u246b\u305d\u306e\u4ed6\uff08\u7d71\u8a08\u60c5\u5831\u3092\u518d\u69cb\u7bc9\uff09\u3002<\/b><\/p>\n<pre class=\"code\">mysqlcheck --analyze -optimize --database \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d -u root -p<br \/>\u203b\u30c7\u30fc\u30bf\u3092\u5927\u91cf\u306bINSERT\u3001DELETE\u3057\u3066\u3044\u308b\u3068\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3057\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u9069\u5ea6\u306b\u7d71\u8a08\u3092\u53d6\u308a\u306a\u304a\u3059\u3002<br \/><\/pre>\n<p>MySQL\u30a4\u30f3\u30b9\u30b3\u5f8c\u3001\u554f\u984c\u306eSQL\u306f\u7206\u901f\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\u5b9f\u884c\u8a08\u753b\u3067\u3001\u6b63\u3057\u304f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u306e\u3082\u78ba\u8a8d\u3002<\/p>\n<p>MySQL5.1\u3067\u3082JOIN\u53e5\u306e\u5909\u308f\u308a\u306b\u3001STRAIGHT_JOIN\u53e5\u3092\u66f8\u304f\u3068\u3001\u30c7\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308b\u9806\u756a\u3092\u6307\u5b9a\u3067\u304d\u308b\u306e\u3067\u3001\u9069\u5207\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u3002<br \/>\u3067\u3059\u304c\u3001\u904b\u7528\u304c\u59cb\u307e\u308b\u3068\u30c7\u30fc\u30bf\u4ef6\u6570\u304c\u5909\u308f\u308a\u3001\u601d\u3063\u305f\u3068\u304a\u308a\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u306a\u304f\u306a\u308b\u3053\u3068\u3082\u8003\u3048\u3089\u308c\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\u305d\u3046\u306a\u308b\u3068\u9045\u304f\u306a\u308b\u305f\u3073\u306b\u3001\uff33\uff31\uff2c\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u306b\u306a\u308a\u73fe\u5b9f\u7684\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3084\u3063\u3071\u308a\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u6b63\u3057\u304f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u304f\u308c\u308b\u306e\u304c\u3001\u4e00\u756a\u697d\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001MySQL5.5\u306f2010\u5e7411\u6708\u6642\u70b9\u3067\u306f\u3001\u958b\u767a\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u306e\u3067\u3001\u304a\u5ba2\u69d8\u306b\u7d0d\u54c1\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u6b63\u5f0f\u30d0\u30fc\u30b8\u30e7\u30f3\u306e5.1\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u65e9\u304f\u30015.5\u304c\u6b63\u5f0f\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u3053\u3068\u3092\u7948\u308b\u307e\u3046\u3059\u3002<\/p>\n<div><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u3001\u30b5\u30fc\u30d0\u69cb\u7bc9\u7cfb\u306e\u4ed5\u4e8b\u304c\u591a\u3044\u306e\u3067\u3001\u81ea\u5b85\u3067\u306e\u691c\u8a3c\u7528\u306b\u30cd\u30c3\u30c8\u30d6\u30c3\u30af\u3092\u8cfc\u5165\u3057\u3001CentOS\u3092\u30a4\u30f3\u30b9\u30b3\u3057\u3066\u30b7\u30b3\u30b7\u30b3\u3044\u3058\u304f\u3063\u3066\u307e\u3059\u3002 \u30cd\u30c3\u30c8\u30d6\u30c3\u30af\u306f\u3001\u30b9\u30da\u30c3\u30af\u304c\u4f4e\u3044\u3067\u3059\u304c\u500b\u4eba\u7684\u306aLinux\u306e\u691c\u8a3c\u7528\u306b\u306f\u6700\u9069\u306e\u30de\u30b7\u30f3\u3067\u3059\u3002\u30fb\u521d\u671f\u8cbb\u7528\u304c\u5b89\u3044\uff083\u4e07\u304f\u3089\u3044\uff09\u3002\u30fb\u7dad\u6301\u8cbb\u304c\u683c\u5b89\uff08\u96fb\u6c17\u4ee3\u304c1\u30f6\u6708\u3064\u3051\u3063\u3071\u306a\u3057\u3067700\u5186\u304f\u3089\u3044 [&hellip;]<\/p>\n","protected":false},"author":36,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[488],"tags":[],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-it"],"views":8,"_links":{"self":[{"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":0,"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaswill.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}