{"id":2450,"date":"2021-12-26T13:19:54","date_gmt":"2021-12-26T04:19:54","guid":{"rendered":"https:\/\/sirius10.net\/blog\/wordpress\/?p=2450"},"modified":"2022-01-31T10:07:40","modified_gmt":"2022-01-31T01:07:40","slug":"post-2450","status":"publish","type":"post","link":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/2021\/12\/26\/2450\/","title":{"rendered":"MariaDB \u306e\u30db\u30b9\u30c8\u3092\u5909\u66f4\u3057\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3002"},"content":{"rendered":"\n<p>\u3000\u65e7\u30b5\u30fc\u30d0\u3067 MariaDB 5.5.33a-winx64 \u3092\u52d5\u304b\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u65b0\u3057\u3044\u30b5\u30fc\u30d0\u3078\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001mysqldump \u3092\u4f7f\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u306e\u304c\u672c\u6765\u306e\u65b9\u6cd5\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u3067\u3082\u52d5\u304f\u306e\u3067\u307e\u305a\u3001\u30b3\u30d4\u30fc\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc<\/h2>\n\n\n\n<p>\u3000\u7a7a\u3044\u3066\u3044\u308b Raspberry Pi \u306b MariaDB \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u65e7\u30b5\u30fc\u30d0\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000WIndows \u7248\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e data \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4e0b\u306b\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3054\u3068\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308b\u306e\u3067\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000Raspberry Pi OS \u3067\u306f\u3001\/var\/lib\/mysql \u4e0b\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u307e\u305a\u3001\u52d5\u3044\u3066\u3044\u308b MariaDB \u3092\u505c\u6b62\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ sudo service mysql stop<\/pre>\n\n\n\n<p>\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308b\u5834\u6240\u306b\u79fb\u52d5\u3057\u3066\u3001\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u30b3\u30d4\u30fc\u3057\u305f\u3089\u3001MariaDB \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002(xxxxx \u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\u306b\u306a\u308a\u307e\u3059\u3002)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ cp -r xxxxx \/var\/lib\/mysql\/.\n$ sudo service mysql start<\/pre>\n\n\n\n<p>\u3000\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ sudo mysql -u root\nMariaDB [(none)]&gt; show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| xxxxx              |\n| information_schema |\n| mysql              |\n| performance_schema |\n+--------------------+\n4 rows in set (0.002 sec)\n\nMariaDB [(none)]&gt; use xxxxx;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nMariaDB [xxxxx]&gt; show tables;\n+--------------------+\n| Tables_in_xxxxx    |\n+--------------------+\n| append_info        |\n| card_info          |\n+--------------------+\n2 rows in set (0.002 sec)\n\nMariaDB [xxxxx]&gt; show fields from append_info;\nERROR 1932 (42S02): Table 'xxxxx.append_info' doesn't exist in engine\nMariaDB [xxxxx]&gt; quit<\/pre>\n\n\n\n<p>\u3000\u3046\u30fc\u3093\u3002\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u9055\u3044\u3059\u304e\u3066\u3060\u3081\u306a\u3088\u3046\u3067\u3059\u30025.5 \u304b\u3089 10.15 \u306f\u51fa\u6765\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3044\u307e\u3059\u3002\u4ee5\u524d\u3084\u3063\u305f\u6642\u306f\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8fd1\u304b\u3063\u305f MariaDB \u540c\u58eb\u3060\u3063\u305f\u306e\u3067\u30b3\u30d4\u30fc\u3057\u305f\u3060\u3051\u3067\u4f7f\u3048\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mysqldump-\u3092\u4f7f\u3046\">mysqldump \u3092\u4f7f\u3046<\/h2>\n\n\n\n<p>\u3000\u672c\u6765\u306f\u3001mysqldump \u3067\u30c7\u30fc\u30bf\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3066\u65b0\u3057\u3044\u65b9\u3078\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u306e\u304c\u6b63\u3057\u3044\u3084\u308a\u65b9\u3067\u3059\u3002\u305f\u3060\u3001\u3082\u3068\u306e\u30de\u30b7\u30f3\u304c\u8d77\u52d5\u3057\u306a\u3044\u306e\u3067\u3001\u30b3\u30d4\u30fc\u3092\u8a66\u3057\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3060\u3081\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u3082\u3068\u306e\u30de\u30b7\u30f3\u306f Windows Web Server 2008 \u3067\u3057\u305f\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u5438\u3044\u51fa\u3057\u305f\u306e\u3067\u30b3\u30de\u30f3\u30c9\u3082\u4e00\u7dd2\u306b\u3042\u308a\u307e\u3059\u3002\u5225\u306a Windows \u30de\u30b7\u30f3\u3067\u52d5\u304b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000Windows \u304c\u52d5\u304f\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306f\u4f7f\u3048\u306a\u3044\u306e\u3067\u3001\u30d0\u30c3\u30c6\u30ea\u30fc\u304c\u5145\u96fb\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3044\u308b Surface Pro4 \u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3002\u30b3\u30d4\u30fc\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u4f5c\u696d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u3001MariaDB \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">C:\u00a5mariadb-5.5.33a-winx64 &gt;bin\u00a5mysqld<\/pre>\n\n\n\n<p>\u3000\u5225\u306a\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">C:\u00a5mariadb-5.5.33a-winx64 &gt;mysql -u root -p<\/pre>\n\n\n\n<p>\u3000\u3042\u308c\uff1f root \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5f3e\u304b\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u306e\u307e\u307e\u3067\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3000\u30bf\u30b9\u30af\u30de\u30cd\u30fc\u30b8\u30e3\u304b\u3089 mysqld \u3092\u7d42\u4e86\u3055\u305b\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u3066\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">C:\u00a5mariadb-5.5.33a-winx64 &gt;bin\u00a5mysqld --skip-grant-tables<\/pre>\n\n\n\n<p>\u3000\u4eca\u5ea6\u306f\u5927\u4e08\u592b\u3067\u3057\u305f\u3002mysqldump \u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002(xxxxx \u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">C:\u00a5mariadb-5.5.33a-winx64 &gt;mysqldump -u root --opt xxxxx &gt; xxxxx.sql<\/pre>\n\n\n\n<p>\u3000\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u304c\u51fa\u6765\u305f\u3088\u3046\u3067\u3059\u3002xxxxx.sql \u3092 MariaDB \u3092\u52d5\u304b\u3057\u3066\u3044\u308b\u30de\u30b7\u30f3\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u4e88\u3081\u4f5c\u3063\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u30c6\u30fc\u30d6\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre id=\"console\" class=\"wp-block-preformatted console\">$ sudo mysql -u root -p xxxxx &lt; xxxxx.sql<\/pre>\n\n\n\n<p>\u3000\u3053\u308c\u3067\u3001\u53e4\u3044\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30c7\u30fc\u30bf\u304c\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u5b9f\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u5225\u30b5\u30a4\u30c8\u3067\u4f7f\u3063\u3066\u3044\u305f\u30c7\u30fc\u30bf\u3067\u3059\u3002\u5225\u30b5\u30a4\u30c8\u306e\u5fa9\u65e7\u3082\u9593\u8fd1\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u65e7\u30b5\u30fc\u30d0\u3067 MariaDB 5.5.33a-winx64 \u3092\u52d5\u304b\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u65b0\u3057\u3044\u30b5\u30fc\u30d0\u3078\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u3000\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001mysqldump \u3092\u4f7f\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u306e\u304c\u672c\u6765\u306e\u65b9\u6cd5\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2450","post","type-post","status-publish","format-standard","hentry","category-server-config"],"_links":{"self":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=2450"}],"version-history":[{"count":5,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2450\/revisions"}],"predecessor-version":[{"id":2543,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2450\/revisions\/2543"}],"wp:attachment":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=2450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=2450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=2450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}