{"id":1016,"date":"2018-08-18T23:10:32","date_gmt":"2018-08-18T14:10:32","guid":{"rendered":"https:\/\/www.ish.org\/blog\/?p=1016"},"modified":"2018-08-19T06:14:11","modified_gmt":"2018-08-18T21:14:11","slug":"mysql%e3%82%92version-up%e3%81%97%e3%81%9f%e3%82%89wordpress%e3%81%8c%e3%81%aa%e3%81%8b%e3%81%aa%e3%81%8b%e5%8b%95%e3%81%84%e3%81%a6%e3%81%8f%e3%82%8c%e3%81%aa%e3%81%84","status":"publish","type":"post","link":"https:\/\/www.ish.org\/blog\/?p=1016","title":{"rendered":"mysql\u3092version up\u3057\u305f\u3089wordpress\u304c\u306a\u304b\u306a\u304b\u52d5\u3044\u3066\u304f\u308c\u306a\u3044"},"content":{"rendered":"<p>mysql\u306f\u305a\u3063\u30688.0.0\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u6d41\u77f3\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30db\u30fc\u30eb\u306e\u584a\u306a\u306e\u3067\u3084\u3063\u3068version up\u3057\u307e\u3057\u305f\u3002<!--more--><br \/>\n\u3057\u304b\u3057\u3001\u305d\u306e\u305f\u3081\u306bwordpress\u304c\u5168\u7136\u52d5\u3044\u3066\u304f\u308c\u306a\u3044\u3002<br \/>\n\u53d6\u308a\u6562\u3048\u305a\u3001\u4eca\u5f8c\u306e\u5099\u5fd8\u306e\u305f\u3081\u306b\u4eca\u56de\u306e\u624b\u9806\u3092\u4ee5\u4e0b\u306b\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<code><br \/>\n(1) mysqldump -u root -p wordpress\u306edb\u540d &gt; wordpress-YYYYMMDD.sql\u3067wordpress\u306eDB\u3092\u9000\u907f\u3002<br \/>\n(2) pkg unlock mysql80-server, pkg unlock mysql80-client<br \/>\n(3) mv -i \/var\/db\/mysql \/var\/db\/mysql-8.0.0\u3067\u9000\u907f<br \/>\n(4) pkg upgrade mysql80-server mysql80-client<br \/>\n(5) \/usr\/local\/etc\/mysql\/my.cnf\u3092\u4fee\u6b63\u3002\u4eca\u56de\u306f8.0.0-&gt;8.0.11(ports\u306f8.0.12\u3060\u3051\u3069\u3001pkg\u306f\u307e\u30608.0.11)\u306a\u306e\u3067\u3001\u304b\u306a\u308a\u5909\u66f4\u3057\u306a\u3044\u3068\u5168\u304f\u8d77\u52d5\u3057\u306a\u3044\u3002<br \/>\n(6) \/usr\/local\/libexec\/mysqld --initialize --user=mysql\u3067DB\u3092\u5b8c\u5168\u521d\u671f\u72b6\u614b\u304b\u3089\u4f5c\u6210\u3057\u76f4\u3059\u3002<br \/>\n(7) \/usr\/local\/etc\/rc.d\/mysql-server start\u3067mysql\u30b5\u30fc\u30d0\u3092\u8d77\u52d5<br \/>\n(8) \/usr\/local\/bin\/mysql_secure_installation -p\u3067DB\u3092\u518d\u4f5c\u6210\uff08\u30d1\u30b9\u30ef\u30fc\u30c9\u306f(6)\u3067\u8868\u793a\u3055\u308c\u305f\u3082\u306e\u3092\u5165\u529b\u3059\u308b\u3002\uff09<br \/>\n(9) mysql -u root -p\u3067\u63a5\u7d9a\u3057<br \/>\nmysql&gt; create schema wordpress\u306edb\u540d;<br \/>\nmysql&gt; exit<br \/>\n(10) mysql -u root -p wordpress &lt; wordpress-YYYYMMDD.sql\u3067\u9000\u907f\u3057\u3066\u3044\u305fDB\u3092\u5fa9\u5143\u3002<br \/>\n(11) mysql -u root -p mysql&gt; create user 'wordpress\u306e\u30e6\u30fc\u30b6'@'localhost' identified with mysql_native_password by '\u30d1\u30b9\u30ef\u30fc\u30c9';<br \/>\nmysql&gt; GRANT ALL PRIVILEGES ON wordpress\u306edb\u540d.* to 'wordpress\u306e\u30e6\u30fc\u30b6'@'localhost';<br \/>\nmysql&gt; FLUSH PRIVILEGES;<br \/>\nmysql&gt; exit<br \/>\n(12) \u307e\u3060\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u30a8\u30e9\u30fc\u300d\u306a\u3089ipfw\u3067\u81ea\u5b85\u4ee5\u5916\u304b\u3089\u306eweb\u30a2\u30af\u30bb\u30b9\u3092\u6b62\u3081\u3066\u3001wp-config.php\u306e2\u884c\u76ee\u306bdefine('WP_DEBUG', true);<br \/>\n\u3092\u8ffd\u52a0\u3057\u3066\u30a8\u30e9\u30fc\u3092\u4fee\u6b63\u3059\u308b\u3002\u4eca\u56de\u306fdefault-character-set=utf8\u3084character-set-server=utf8\u3092my.cnf\u306b\u660e\u793a\u3057\u3001default_authentication_plugin=mysql_native_password\u3082my.cnf\u306b\u8ffd\u52a0\u3057\u3066\u3084\u3063\u3068\u56de\u5fa9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><\/code><\/p>\n<p>P.S. \u305d\u306e\u5f8c\u3001ports\u304b\u30898.0.12\u306b\u5165\u308c\u66ff\u3048\u3066\u307f\u307e\u3057\u305f\u304c\u4eca\u5ea6\u306f\u305d\u306e\u307e\u307e\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mysql\u306f\u305a\u3063\u30688.0.0\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u6d41\u77f3\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30db\u30fc\u30eb\u306e\u584a\u306a\u306e\u3067\u3084\u3063\u3068version up\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-1016","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1016"}],"version-history":[{"count":7,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1016\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ish.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}