{"id":8265,"date":"2024-08-05T19:22:17","date_gmt":"2024-08-05T10:22:17","guid":{"rendered":"https:\/\/east19-mikas.com\/mpat\/?page_id=8265"},"modified":"2024-08-05T20:43:14","modified_gmt":"2024-08-05T11:43:14","slug":"%e4%be%bf%e5%88%a9%e3%81%aa%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89","status":"publish","type":"page","link":"https:\/\/east19-mikas.com\/mpat\/?page_id=8265","title":{"rendered":"\u4fbf\u5229\u306a\u30b3\u30de\u30f3\u30c9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">MYSQL\u30b3\u30de\u30f3\u30c9<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u57fa\u672c\u7684\u30b3\u30de\u30f3\u30c9<\/h3>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u306bSSH\u63a5\u7d9a\u3057\u3001\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u8abf\u3079\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\"># <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">ssh root@192.168.21.201<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\n# root@192.168.21.201's password: \u3000\u3000\u3000\u3000&lt;\u30fb\u30fb\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\n\nLast login: Wed Mar 30 10:09:51 2022 from 192.168.21.2\n# <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">Enter password         <\/mark>     \u3000\u3000\u3000\u3000\u3000\u3000<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\"> &lt;\u30fb\uff65\uff65\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">Welcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 27979\nServer version: 8.0.26 Source distribution\n\nCopyright (c) 2000, 2021, Oracle and\/or its affiliates.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n# \u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u78ba\u8a8d\uff01\nmysql&gt; <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">select Host, User from mysql.user;<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">+-----------+------------------+\n| host      | user             |<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">+-----------+------------------+\n| localhost | mysql.infoschema |\n| localhost | mysql.session    |\n| localhost | mysql.sys        |\n| localhost | root             |\n+-----------+------------------+\n4 rows in set (0.01 sec)\n\nmysql&gt;<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u3092\u8a2d\u5b9a\u3057\u307e\u3059<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">mysql &gt;<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">create user 'topadmin'@'localhost' identified by 'cbAr3,128';<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">Query OK, 0 rows affected (0.00 sec)\nmydql &gt; <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">grant all on *.* to 'topadmin'@'localhost';<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql&gt;<\/mark> <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u307e\u3059<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">mysql &gt;<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">drop user 'user_name'@'localhost';<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">Query OK, 0 rows affected (0.00 sec)\n\nmysql &gt;<\/mark><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u64cd\u4f5c<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u8868\u793a\u3055\u305b\u307e\u3059<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">mysql &gt;<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">show databases;<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mput1              |\n| mput2              |\n| mysql              |\n| performance_schema |\n| sys                |\n+--------------------+\n6 rows in set (0.00 sec)\n\nmysql &gt;<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">quit;<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">Bye<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9 mput2 \u3092SQL\u30d5\u30a1\u30a4\u30eb\u306b\u3001\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3066\u307f\u307e\u3059\u3002\u307e\u305a\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u5834\u6240\u306b\u79fb\u52d5\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\"># <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">cd ~\/<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\n# <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysqldump -h localhost -u root -p --add-drop-table mput2 &gt; mput2.sql<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nEnter password:               &lt;=== \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059\n# <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">ls -l<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\n\u5408\u8a08 1504\n-rw-r--r--. 1 root root 1532285  4\u6708 26 20:45 mput2.sql\n#<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30a4\u30f3\u30dd\u30fc\u30c8<\/h3>\n\n\n\n<p>SQL\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001\u30b3\u30de\u30f3\u30c9\u3067\u306f\u3001Zip\u5727\u7e2e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u51fa\u6765\u307e\u305b\u3093\u3067\u3057\u305f\u3002SQL\u30d5\u30a1\u30a4\u30eb\u306e\u307e\u307e\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u5148\u306b\u3001mput2\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>SQL\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u304b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#3f3f3f\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\"># <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">cd ~\/<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\n# <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nEnter password:            &lt;===\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059\nmysql &gt; <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">create database if not exists mput2;<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql &gt; <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">quit;<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nBye\n# <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p mput2  &lt; mput2.sql<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-white-color\">\nEnter password:        &lt;=== \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059\n#<\/mark><\/code><\/pre>\n\n\n\n<p>\u6b63\u5e38\u306b\u7d42\u4e86\u3059\u308b\u3068\u3001# \u3067\u7d42\u308f\u308a\u307e\u3059\u3002\u30a8\u30e9\u30fc\u304c\u3042\u308b\u3068\u3001\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MYSQL\u30b3\u30de\u30f3\u30c9 \u57fa\u672c\u7684\u30b3\u30de\u30f3\u30c9 \u30b5\u30fc\u30d0\u30fc\u306bSSH\u63a5\u7d9a\u3057\u3001\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u8abf\u3079\u308b \u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u3092\u8a2d\u5b9a\u3057\u307e\u3059 \u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u307e\u3059 \u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u64cd\u4f5c \u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u8868\u793a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7978,"parent":8244,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-8265","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/8265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8265"}],"version-history":[{"count":1,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/8265\/revisions"}],"predecessor-version":[{"id":8266,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/8265\/revisions\/8266"}],"up":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/8244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/media\/7978"}],"wp:attachment":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}