{"id":1,"date":"2019-07-08T10:14:37","date_gmt":"2019-07-08T01:14:37","guid":{"rendered":"http:\/\/plusload.dip.jp\/?p=1"},"modified":"2019-07-08T10:54:53","modified_gmt":"2019-07-08T01:54:53","slug":"hello-world","status":"publish","type":"post","link":"https:\/\/plusload.net\/?p=1","title":{"rendered":"MySql\u306e\u6587\u5b57\u5316\u3051"},"content":{"rendered":"\n<p>Lubuntu16.01\u306bNginx\u3001PHP\u3001Wordpress\u3068MySql\u3092\u5165\u308c\u305f\u3089\u6587\u5b57\u5316\u3051\u3057\u3066\u308b\u3002<\/p>\n\n\n\n<p>\u6700\u521d\u306fWordpress\u306b\u554f\u984c\u3042\u308b\u306e\u304b\u3068\u601d\u3044wp-config.php\u3092\u78ba\u8a8d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/** \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u969b\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u6587\u5b57\u30bb\u30c3\u30c8 *\/<br>\ndefine('DB_CHARSET', 'utf8');<\/pre>\n\n\n\n<p>utf8\u306b\u306a\u3063\u3066\u308b\u3002\u305d\u308a\u3083\u305d\u3046\u3060\u3002\u3055\u3063\u304d\u81ea\u5206\u3067\u66f8\u3044\u305f\u3082\u3093\u3002<\/p>\n\n\n\n<p>\u3058\u3083\u3042\u3001MySql\u306e\u554f\u984c\u304b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; show variables like \"chara%\";\n+--------------------------+----------------------------+\n| Variable_name            | Value                      |\n+--------------------------+----------------------------+\n| character_set_client     | utf8                       |\n| character_set_connection | utf8                       |\n| character_set_database   | latin1                     |\n| character_set_filesystem | binary                     |\n| character_set_results    | utf8                       |\n| character_set_server     | latin1                     |\n| character_set_system     | utf8                       |\n| character_sets_dir       | \/usr\/share\/mysql\/charsets\/ |\n+--------------------------+----------------------------+\n8 rows in set (0.02 sec)<\/pre>\n\n\n\n<p>\u3042\u3042\u3001\u305d\u306e\u3088\u3046\u3060\u306d\u3002\u3058\u3083\u3001Server\u3068DB\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092latin1\u304b\u3089utf8\u306b\u5909\u66f4\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@ubuntu:~# vi \/etc\/mysql\/mysql.conf.d\/mysqld.cnf\n\n[mysqld]\n #\n #* Basic Settings\n #\n user            = mysql\n pid-file        = \/var\/run\/mysqld\/mysqld.pid\n socket          = \/var\/run\/mysqld\/mysqld.sock\n port            = 3306\n basedir         = \/usr\n datadir         = \/var\/lib\/mysql\n tmpdir          = \/tmp\n lc-messages-dir = \/usr\/share\/mysql\n skip-external-locking\n #skip-grant-tables\n character-set-server=utf8 #\u2190\u3053\u308c\u304c\u305d\u3046 [mysqld] \u306b\u8ffd\u8a18<\/pre>\n\n\n\n<p>\u3053\u308c\u3067\u3044\u3044\u306f\u305a\u3002phpmyadmin\u3067\u65e5\u672c\u8a9e\u3092wordpress\u306ewp-options\u306b\u66f8\u304d\u8fbc\u3093\u3067\u307f\u308b\u3002<\/p>\n\n\n\n<p>\u3042\u308c\uff1f\u30a8\u30e9\u30fc\u3067\u66f8\u304d\u8fbc\u3081\u306a\u3044\uff01<\/p>\n\n\n\n<p>\u3046\uff5e\u3093\u3002DB\u81ea\u4f53\u304c\u3060\u3081\u306a\u3093\u304b\u306a\u3002\u3067\u4e00\u65e6wordpress\u3092\u524a\u9664\u3057\u3066\u4f5c\u308a\u76f4\u3057\u3066wordpress\u304b\u3089\u518d\u30a2\u30af\u30bb\u30b9\u3057\u3066DB\u3092\u4f5c\u308a\u76f4\u3057\u305f\u3089\u65e5\u672c\u8a9eOK\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lubuntu16.01\u306bNginx\u3001PHP\u3001Wordpress\u3068MySql\u3092\u5165\u308c\u305f\u3089\u6587\u5b57\u5316\u3051\u3057\u3066\u308b\u3002 \u6700\u521d\u306fWordpress\u306b\u554f\u984c\u3042\u308b\u306e\u304b\u3068\u601d\u3044wp-config.php\u3092\u78ba\u8a8d\u3002 \/** \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7,6],"tags":[],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-mysql","category-nginx","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1"}],"version-history":[{"count":2,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/plusload.net\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plusload.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}