{"id":89,"date":"2015-02-02T10:46:00","date_gmt":"2015-02-02T01:46:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=89"},"modified":"2015-02-02T10:46:00","modified_gmt":"2015-02-02T01:46:00","slug":"dti_2","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2015\/02\/dti_2\/","title":{"rendered":"DTI\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\uff13\uff14 \u300c\u65b0\u3057\u3044\u5834\u6240\u3067\u518d\u51fa\u767a\uff01\u300d"},"content":{"rendered":"<div>\nMySQL\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3068\u30ea\u30b9\u30c8\u30a2\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u79fb\u884c\u3057\u3088\u3046\u3002<p><\/p>\n<p>\u3060\u304c\uff01<br>\n\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5143\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u304clatin1\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304cUTF-8\u3068\u306a\u3063\u3066\u3044\u3066\u3001<\/p><\/div>\n<div>\n\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5148\u306e\u30b7\u30b9\u30c6\u30e0\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304cUTF-8\u306e\u6642\u3001<\/div>\n<div>\n\u6587\u5b57\u5316\u3051\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u3001\u3044\u308d\u3044\u308d\u5927\u5909\u3002<\/div>\n<div>\n<\/div>\n<div>\n\u5177\u4f53\u7684\u306b\u306f\u3001<\/div>\n<p>$ mysql -u myswluser -p<\/p>\n<div>\n\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5143\u306e\u6587\u5b57\u30b3\u30fc\u30c9<p><\/p>\n<p>mysql&gt; show variables like &#8216;collation%&#8217;;<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n| Variable_name &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n| collation_connection | latin1_swedish_ci |<br>\n| collation_database &nbsp; | latin1_swedish_ci |<br>\n| collation_server &nbsp; &nbsp; | latin1_swedish_ci |<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n3 rows in set (0.00 sec)<br>\nmysql&gt; SHOW VARIABLES LIKE &#8216;char%&#8217;;<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n| Variable_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n| character_set_client &nbsp; &nbsp; | latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_set_connection | latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_set_database &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>\n| character_set_filesystem | binary &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_set_results &nbsp; &nbsp;| latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_set_server &nbsp; &nbsp; | latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_set_system &nbsp; &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n| character_sets_dir &nbsp; &nbsp; &nbsp; | \/usr\/share\/mysql\/charsets\/ |<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br>\n8 rows in set (0.00 sec)\n<\/p><\/div>\n<div>\n<\/div>\n<div>\n\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5148\u306e\u6587\u5b57\u30b3\u30fc\u30c9<\/div>\n<div>\n<p>mysql&gt; show variables like &#8216;collation%&#8217;;<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>\n| Variable_name &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>\n| collation_connection | utf8_general_ci |<br>\n| collation_database &nbsp; | utf8_general_ci |<br>\n| collation_server &nbsp; &nbsp; | utf8_general_ci |<br>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>\n3 rows in set (0.00 sec)<br>\nmysql&gt; SHOW VARIABLES LIKE &#8216;char%&#8217;;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+| Variable_name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Value&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+| character_set_client &nbsp; &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_connection | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_database &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_filesystem | binary &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_results&nbsp; &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_server &nbsp; &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_set_system &nbsp; &nbsp; | utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || character_sets_dir &nbsp; &nbsp; &nbsp; | \/usr\/share\/mysql\/charsets\/ |+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+8 rows in set (0.00 sec)<\/p>\n<div class=\"p1\">\n<\/div>\n<div class=\"p1\">\n<\/div>\n<div class=\"p1\">\n\u307e\u305a\u3001mysqldump\u3067\u6587\u5b57\u30b3\u30fc\u30c9\u306blatin1\u3092\u6307\u5b9a\u3059\u308b\u3002<\/div>\n<p>$ sudo mysqldump -u username -p &#8211;default-character-set=latin1&nbsp;dbname&nbsp;&gt; dump.sql<br>\n&nbsp;\u30d5\u30a1\u30a4\u30eb\u4e2d\u306elatin1\u306e\u90e8\u5206\u3092utf8\u306b\u7f6e\u63db\u3002<\/p>\n<p>$ sed -i -e &#8216;s\/SET NAMES latin1\/SET NAMES utf8\/g&#8217; dump.sql<\/p>\n<div class=\"p1\">\n\u30ea\u30b9\u30c8\u30a2\u5148\u3067<\/div>\n<p>$ mysql -u mysqluser -p dbname &lt; dump.sql\n<\/p><\/div>\n<p><a href=\"\/blog\/p\/dti.html\">\u2605DTI\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u4e00\u89a7\u306f\u3053\u3061\u3089\u2605<\/a><\/p>\n\n\n<p><a href=\"https:\/\/px.a8.net\/svt\/ejp?a8mat=25VJAH+72TKGQ+1QFI+109XW1\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"728\" height=\"90\" alt=\"\" src=\"https:\/\/www24.a8.net\/svt\/bgt?aid=130801769428&amp;wid=002&amp;eno=01&amp;mid=s00000008091006093000&amp;mc=1\"><\/a>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/www11.a8.net\/0.gif?a8mat=25VJAH+72TKGQ+1QFI+109XW1\" alt=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3068\u30ea\u30b9\u30c8\u30a2\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u79fb\u884c\u3057\u3088\u3046\u3002 \u3060\u304c\uff01 \u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5143\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u304clatin1\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304cUTF-8\u3068\u306a\u3063\u3066\u3044\u3066\u3001 \u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5148\u306e\u30b7\u30b9\u30c6\u30e0\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304cUTF-8\u306e\u6642\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,130],"tags":[17,43],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-pc","category-130","tag-dti","tag-vps"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}