{"id":1119,"date":"2024-04-28T16:31:47","date_gmt":"2024-04-28T07:31:47","guid":{"rendered":"https:\/\/www.aqua-informatics.jp\/?p=1119"},"modified":"2024-04-28T20:44:05","modified_gmt":"2024-04-28T11:44:05","slug":"mariadb%e3%81%ae%e3%83%ab%e3%83%bc%e3%83%88%e3%81%ae%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e5%bf%98%e3%82%8c%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.aqua-informatics.jp\/?p=1119","title":{"rendered":"mariadb\u306e\u30eb\u30fc\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u305f\u3002"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.aqua-informatics.jp\/?p=1119\/#%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\" >\u306f\u3058\u3081\u306b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.aqua-informatics.jp\/?p=1119\/#%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E7%84%A1%E3%81%97%E3%81%A7%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%99%E3%82%8B\" >\u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.aqua-informatics.jp\/?p=1119\/#%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E3%82%92%E5%A4%89%E6%9B%B4\" >\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.aqua-informatics.jp\/?p=1119\/#%E5%BE%8C%E5%87%A6%E7%90%86\" >\u5f8c\u51e6\u7406<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\"><\/span>\u306f\u3058\u3081\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>01:25 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ mysql -u root -p\nEnter password: \nERROR 1698 (28000): Access denied for user &#39;root&#39;@&#39;localhost&#39;<\/code><\/pre><\/div>\n\n\n\n<p>root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u305f\u306e\u3067\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u3002\u3088\u304f\u5fd8\u308c\u308b\u306e\u3067\u3001\u3053\u3053\u306b\u8a18\u9332\u3057\u3068\u3053<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E7%84%A1%E3%81%97%E3%81%A7%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%99%E3%82%8B\"><\/span>\u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>--skip-grant-tables\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8d77\u52d5\u3059\u308b\u3002\u7279\u6a29\u30c6\u30fc\u30d6\u30eb\u306e\u30c1\u30a7\u30c3\u30af\u304c\u7121\u52b9\u5316\u3055\u308c\u3066\u3001\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u7279\u6a29\u304c\u4e0e\u3048\u3089\u308c\u305f\u72b6\u614b(\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057)\u3067\u30ed\u30b0\u30a4\u30f3\u53ef\u80fd\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>01:34 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl stop mariadb\n01:35 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl set-environment MYSQLD_OPTS=&quot;--skip-grant-tables&quot;\n01:36 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl start mariadb<\/code><\/pre><\/div>\n\n\n\n<p>\u5165\u308c\u305f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>01:36 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ mysql -u root\n$ sudo mysql -u root\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 33\nServer version: 10.6.16-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType &#39;help;&#39; or &#39;\\h&#39; for help. Type &#39;\\c&#39; to clear the current input statement.<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E3%82%92%E5%A4%89%E6%9B%B4\"><\/span>\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u3092\u8a66\u307f\u308b\u304c\u30a8\u30e9\u30fc\u3060\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>MariaDB [(none)]&gt; alter user &#39;root&#39;@&#39;localhost&#39; identified by &#39;********&#39;;\nERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement<\/code><\/pre><\/div>\n\n\n\n<p>\u3042\u3001\u7279\u6a29\u30c6\u30fc\u30d6\u30eb\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u901a\u5e38\u306e\u65b9\u6cd5\u3067\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u306f\u7121\u52b9\u3001\u30a8\u30e9\u30fc\u3068\u306a\u308b\u3002flush privileges;\u3067\u7279\u6a29\u60c5\u5831\u3092\u518d\u8aad\u8fbc\u3057\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>MariaDB [(none)]&gt; flush privileges;\nQuery OK, 0 rows affected (0.001 sec)\n\nMariaDB [(none)]&gt; alter user &#39;root&#39;@&#39;localhost&#39; identified by &#39;********&#39;;\nQuery OK, 0 rows affected (0.001 sec)\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BE%8C%E5%87%A6%E7%90%86\"><\/span>\u5f8c\u51e6\u7406<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>mariadb\u306e\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3082\u3068\u306b\u623b\u3057\u3066\u518d\u8d77\u52d5\u3002\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>01:46 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl stop mariadb\n01:46 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl unset-environment MYSQLD_OPTS\n01:47 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo systemctl start mariadb\n01:47 \u5348\u5f8c kimi@ryzen9-MS-7C37:~\n$ sudo mysql -u root -p\nEnter password: \nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 5\nServer version: 10.6.16-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType &#39;help;&#39; or &#39;\\h&#39; for help. Type &#39;\\c&#39; to clear the current input statement.\n\nMariaDB [(none)]&gt; \n<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u305f\u306e\u3067\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u3002\u3088\u304f\u5fd8\u308c\u308b\u306e\u3067\u3001\u3053\u3053\u306b\u8a18\u9332\u3057\u3068\u3053 \u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b --skip-grant-tables\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8d77\u52d5\u3059\u308b\u3002\u7279\u6a29\u30c6\u30fc\u30d6\u30eb\u306e\u30c1\u30a7\u30c3\u30af\u304c\u7121\u52b9\u5316\u3055\u308c\u3066\u3001\u3059 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":87,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/1119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1119"}],"version-history":[{"count":4,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/1119\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/1119\/revisions\/1123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/media\/87"}],"wp:attachment":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}