{"id":2320,"date":"2019-02-02T13:00:25","date_gmt":"2019-02-02T04:00:25","guid":{"rendered":"https:\/\/east19-mikas.com\/?page_id=2320"},"modified":"2024-08-20T14:39:00","modified_gmt":"2024-08-20T05:39:00","slug":"mysql","status":"publish","type":"page","link":"https:\/\/east19-mikas.com\/mpat\/?page_id=2320","title":{"rendered":"MySQL"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fcMySQL 5.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0<\/h3>\n\n\n\n<p>\u6a19\u6e96\u30ea\u30dd\u30b8\u30c8\u30ea\u63d0\u4f9b\u306e\u3082\u306e\u3092\u512a\u5148\u3059\u308b\u3088\u3046\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5165\u308c\u3001\u8ffd\u52a0\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-16431f9c8eb722fe7fc4176ee9629e70\" style=\"background-color:#444444\"># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">yum -y install yum-plugin-priorities<\/mark><\/span><br>\u6a19\u6e96\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u518d\u512a\u5148\u306b\u3059\u308b<br># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">sed -i -e &#8220;s\/\\]$\/\\]\\npriority=1\/g&#8221; \/etc\/yum.repos.d\/CentOS-Base.repo<\/mark><\/span><br><br>EPEL \u3092\u8ffd\u52a0\u3057\u307e\u3059<br># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">yum -y install epel-release<\/mark><\/span><br><br>CentOS SCLo Software collections \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 <br># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">yum -y install centos-release-scl-rh centos-release-scl<\/mark><\/span><br><br>\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6570\u591a\u304f\u914d\u5e03\u3055\u308c\u3066\u3044\u308b Remi&#8217;s RPM repository \u3092\u8ffd\u52a0<br># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">yum -y install http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<\/mark><\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MySQL 5.7 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<p>\u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e MariaDB \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u72b6\u614b\u3067\u3082\u3001Software Collections \u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u5225\u30d1\u30b9\u306b\u30a4\u30f3\u30b9\u30fc\u30eb\u3055\u308c\u308b\u305f\u3081\u3001\u5171\u5b58\u306f\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-68ee9076efba49a2425f06d735b134ad\" style=\"background-color:#444444\"># <span style=\"color: #ff0;\">SCLo<\/span>\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br># <span style=\"color: #ff0;\">yum &#8211;enablerepo=centos-sclo-rh -y install rh-mysql57-mysql-server<\/span><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Software Collections \u30d1\u30c3\u30b1\u30fc\u30b8\u306f \/opt \u914d\u4e0b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059<\/h3>\n\n\n\n<p>\u74b0\u5883\u5909\u6570\u3092\u8aad\u307f\u8fbc\u3093\u3067\u5229\u7528\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-893413f4b807f379b565115db7be679b\" style=\"background-color:#444444\"># \u74b0\u5883\u5909\u6570\u3092\u8aad\u307f\u8fbc\u3080<br># <span style=\"color: #ff0;\">scl enable rh-mysql57 bash<\/span><br><br># <span style=\"color: #ff0;\">mysql -V<\/span><br>mysql Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper<br><br># <span style=\"color: #ff0;\">which mysql<\/span><br>\/opt\/rh\/rh-mysql57\/root\/usr\/bin\/mysql<\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30ed\u30b0\u30a4\u30f3\u6642\u306b\u81ea\u52d5\u7684\u306b\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059<\/h3>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-0f807b2d76854e0a139aede94b91cfdc\" style=\"background-color:#444444\"># <span style=\"color: #ff0;\">vi \/etc\/profile.d\/rh-mysql57.sh<\/span><br><br># \u4ee5\u4e0b\u306e\u5185\u5bb9\u3067\u65b0\u898f\u4f5c\u6210<br><span style=\"color: #0f0;\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-5-color\">#!\/bin\/bash<br><br>source \/opt\/rh\/rh-mysql57\/enable<br>export X_SCLS=&#8221;`scl enable rh-mysql57 &#8216;echo $X_SCLS&#8217;`&#8221;<\/mark><\/span><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MySQL 5.7 \u3092\u6709\u52b9\u306b\u3057\u3066\u521d\u671f\u8a2d\u5b9a\u3092\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/h3>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-dc8897f20c08279dd43b04f14a622ef8\" style=\"background-color:#444444\"># <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">vi \/etc\/opt\/rh\/rh-mysql57\/my.cnf.d\/rh-mysql57-mysql-server.cnf<\/mark><br><br># [mysqld] \u30bb\u30af\u30b7\u30e7\u30f3\u5185\u306b\u8ffd\u8a18<br>[mysqld]<br><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\">character-set-server=utf8<\/mark><br><br># <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">systemctl start rh-mysql57-mysqld<\/mark><br># <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">systemctl enable rh-mysql57-mysqld<\/mark><br><br># <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql_secure_installation<\/mark><br><br>Securing the MySQL server deployment.<br><br>Connecting to MySQL using a blank password.<br><br>VALIDATE PASSWORD PLUGIN can be used to test passwords<br>and improve security. It checks the strength of password<br>and allows the users to set only those passwords which are<br>secure enough. Would you like to setup VALIDATE PASSWORD plugin?<br><br># \u30d1\u30b9\u30ef\u30fc\u30c9\u54c1\u8cea\u30c1\u30a7\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6709\u52b9\u5316\u306e\u9078\u629e<br>Press y|Y for Yes, any other key for No: <mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\">y<\/mark><br><br>There are three levels of password validation policy:<br><br>LOW    Length &gt;= 8<br>MEDIUM Length &gt;= 8, numeric, mixed case, and special characters<br>STRONG Length &gt;= 8, numeric, mixed case, special characters and dictionary     file<br><br># \u30d1\u30b9\u30ef\u30fc\u30c9\u54c1\u8cea\u30c1\u30a7\u30c3\u30af\u306e\u5f37\u5ea6\u306e\u9078\u629e<br>Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: <mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\">2<\/mark><br>Please set the password for root here.<br><br># root \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a<br>New password:<br><br>Re-enter new password:<br>By default, a MySQL installation has an anonymous user,<br>allowing anyone to log into MySQL without having to have<br>a user account created for them. This is intended only for<br>testing, and to make the installation go a bit smoother.<br>You should remove them before moving into a production<br>environment.<br><br># \u533f\u540d\u30e6\u30fc\u30b6\u30fc\u524a\u9664<br>Remove anonymous users? (Press y|Y for Yes, any other key for No) : <mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\">y<\/mark><br>Success.<br><br>Normally, root should only be allowed to connect from<br>&#8216;localhost&#8217;. This ensures that someone cannot guess at<br>the root password from the network.<br><br># root \u306e\u30ea\u30e2\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u6709\u52b9\/\u7121\u52b9<br>Disallow root login remotely? (Press y|Y for Yes, any other key for No) : <mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\">y<\/mark><br>Success.<br><br>By default, MySQL comes with a database named &#8216;test&#8217; that<br>anyone can access. This is also intended only for testing,<br>and should be removed before moving into a production<br>environment.<br><br># \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u524a\u9664<br>Remove test database and access to it? (Press y|Y for Yes, any other key for No) :<mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\"> y<\/mark><br> &#8211; Dropping test database&#8230;<br>Success.<br><br> &#8211; Removing privileges on test database&#8230;<br>Success.<br><br>Reloading the privilege tables will ensure that all changes<br>made so far will take effect immediately.<br><br># \u7279\u6a29\u60c5\u5831\u30ea\u30ed\u30fc\u30c9<br>Reload privilege tables now? (Press y|Y for Yes, any other key for No) :<mark style=\"background-color:rgba(0, 0, 0, 0);color:#00ff00\" class=\"has-inline-color\"> y<\/mark><br>Success.<br><br>All done!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MySQL \u306b root \u30e6\u30fc\u30b6\u30fc\u3067\u63a5\u7d9a<\/h3>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-fde51acfd9b97d6ebf78bb0ca2e47f7b\" style=\"background-color:#444444\"># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p<\/mark><\/span><br>Enter password:<span id=\"gybk\">&nbsp;<\/span>     <span id=\"gylo\"># \u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u8a8d\u8a3c<\/span><br>Welcome to the MySQL monitor.  Commands end with ; or \\g.<br>Your MySQL connection id is 4<br>Server version: 5.7.16 MySQL Community Server (GPL)<br><br>Copyright (c) 2000, 2016, Oracle and\/or its affiliates. All rights reserved.<br><br>Oracle is a registered trademark of Oracle Corporation and\/or its<br>affiliates. Other names may be trademarks of their respective<br>owners.<br><br>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<br><br># \u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u4e00\u89a7\u8868\u793a<br>mysql&gt;<mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\"> <span id=\"yelo\">select user,host from mysql.user;<\/span><\/mark><br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+<br>| user      | host      |<br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+<br>| mysql.sys | localhost |<br>| root      | localhost |<br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+<br>2 rows in set (0.00 sec)<br><br># \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4e00\u89a7\u8868\u793a<br><br>mysql&gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">show databases;<\/mark><\/span><br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| Database           |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| information_schema |<br>| mysql              |<br>| performance_schema |<br>| sys                |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>4 rows in set (0.00 sec)<br><br>mysql&gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">quit;<\/mark><\/span><br>Bye<br><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL \u3092\u4ed6\u30db\u30b9\u30c8\u304b\u3089\u5229\u7528\u3059\u308b\u5834\u5408 firewall\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0<\/h2>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-eedd69c4550a8d63d20fdd605b15c381\" style=\"background-color:#444444\"># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">firewall-cmd &#8211;add-service=mysql &#8211;permanent<\/mark><\/span><br>success<br># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">firewall-cmd &#8211;reload<\/mark><\/span><br>success <\/p>\n\n\n\n<p>\u30dd\u30fc\u30c8 3306\/TCP \u3092\u4f7f\u7528\u3057\u307e\u3059\u306e\u3067\u30dd\u30fc\u30c8\u3082\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-d229801efe553c737b4f57cca68580b3\" style=\"background-color:#444444\"># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">firewall-cmd &#8211;add-port=3306\/tcp &#8211;permanent<\/mark><\/span><br># <span class=\"cylo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">firewall-cmd &#8211;reload<\/mark><\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL\u6587\u306e\u4f8b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u306e\u7ba1\u7406<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">MySQL\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u78ba\u8a8d\u3057\u307e\u3059<\/h4>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-e37034e28bd2ec3ccd5b3bc601104868\" style=\"background-color:#444444\">#<mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\"> <span id=\"yelo\">mysql -u root -p<\/span><\/mark><br>Enter password:<span id=\"gybk\">&nbsp;<\/span>        <span id=\"yelo\">&lt;=== root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter<\/span><br>mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">select Host, User from mysql.user;<\/mark><\/span><br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+<br>| host      | user          |<br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+<br>| localhost | hpadmin       |<br>| localhost | mysql.session |<br>| localhost | mysql.sys     |<br>| localhost | root          |<br>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+<br>4 rows in set (0.00 sec)<br>mysql &gt; <br><\/p>\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<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-170be7e4297997df78f2fda82fd93ea7\" style=\"background-color:#444444\">mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">create user &#8216;topadmin&#8217;@&#8217;localhost&#8217; identified by &#8216;cbAr3,128&#8217;;<\/mark><\/span><br>Query OK, 0 rows affected (0.00 sec)<br>mydql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">grant all on *.* to &#8216;topadmin&#8217;@&#8217;localhost&#8217;;<\/mark><\/span><br>Query OK, 0 rows affected (0.00 sec)<br><br>mysql&gt; <br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u307e\u3059<\/h4>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-a251a11f4ea62693d3f8ab6effdb2be0\" style=\"background-color:#444444\">mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">drop user &#8216;user_name&#8217;@&#8217;localhost&#8217;;<\/mark><\/span><br>Query OK, 0 rows affected (0.00 sec)<br><br>mysql &gt;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u64cd\u4f5c<\/h3>\n\n\n\n<h4 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<\/h4>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-8e8b4d49229aff7909bf97baf4bb2c9f\" style=\"background-color:#444444\">mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">show databases;<\/mark><\/span><br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| Database           |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>| information_schema |<br>| mput1              |<br>| mput2              |<br>| mysql              |<br>| performance_schema |<br>| sys                |<br>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br>6 rows in set (0.00 sec)<br><br>mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">quit;<\/mark><\/span><br>Bye<br><br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/h4>\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<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-6651e7c164fd8c513ecebd43726c4fab\" style=\"background-color:#444444\"># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">cd ~\/<\/mark><\/span><br># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysqldump -h localhost -u root -p &#8211;add-drop-table mput2 &gt; mput2.sql<\/mark><\/span><br>Enter password:<span id=\"gybk\">&nbsp;<\/span>              <span id=\"yelo\">&lt;=== \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059<\/span><br>#<mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\"> <span id=\"yelo\">ls -l<\/span><\/mark><br>\u5408\u8a08 1504<br>-rw-r&#8211;r&#8211;. 1 root root 1532285  4\u6708 26 20:45 mput2.sql<br># <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30a4\u30f3\u30dd\u30fc\u30c8<\/h4>\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<p class=\"has-white-color has-text-color has-background has-link-color wp-elements-7433fa3d29edaffcf9be08880ee1233a\" style=\"background-color:#444444\"># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">cd ~\/<\/mark><\/span><br># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p<\/mark><\/span><br>Enter password:<span id=\"gybk\">&nbsp;<\/span>           <span id=\"yelo\">&lt;===\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059<\/span><br>mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">create database if not exists mput2;<\/mark><\/span><br>Query OK, 0 rows affected (0.00 sec)<br><br>mysql &gt; <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">quit;<\/mark><\/span><br>Bye<br># <span id=\"yelo\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ffff00\" class=\"has-inline-color\">mysql -u root -p mput2  &lt; mput2.sql<\/mark><\/span><br>Enter password:        <span id=\"yelo\">&lt;=== \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057Enter\u3092\u62bc\u3057\u307e\u3059<\/span><br>#  <\/p>\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>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fcMySQL 5.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0 \u6a19\u6e96\u30ea\u30dd\u30b8\u30c8\u30ea\u63d0\u4f9b\u306e\u3082\u306e\u3092\u512a\u5148\u3059\u308b\u3088\u3046\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5165\u308c\u3001\u8ffd\u52a0\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 # yum -y install yum-plug [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7886,"parent":1824,"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-2320","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/2320","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=2320"}],"version-history":[{"count":3,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/2320\/revisions"}],"predecessor-version":[{"id":8639,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/2320\/revisions\/8639"}],"up":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/pages\/1824"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=\/wp\/v2\/media\/7886"}],"wp:attachment":[{"href":"https:\/\/east19-mikas.com\/mpat\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}