{"id":222,"date":"2026-04-06T01:06:42","date_gmt":"2026-04-05T16:06:42","guid":{"rendered":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=222"},"modified":"2026-04-06T01:06:42","modified_gmt":"2026-04-05T16:06:42","slug":"mysql%e3%80%80%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e6%a7%8b%e7%af%89","status":"publish","type":"page","link":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=222","title":{"rendered":"MySQL\u3000\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9"},"content":{"rendered":"\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>MariaDB \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><br>root@falcon21:~#\u00a0<strong>dnf -y install mariadb-server<\/strong><br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f:<br>mariadb-3:10.11.11-1.el10.x86_64 \u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000mariadb-backup-3:10.11.11-1.el10.x86_64<br>mariadb-client-utils-3:10.11.11-1.el10.x86_64\u3000 mariadb-common-3:10.11.11-1.el10.noarch<br>mariadb-connector-c-3.4.4-1.el10.x86_64 \u3000\u3000\u3000mariadb-connector-c-config-3.4.4-1.el10.noarch<br>mariadb-errmsg-3:10.11.11-1.el10.noarch \u3000\u3000\u3000mariadb-gssapi-server-3:10.11.11-1.el10.x86_64<br>mariadb-server-3:10.11.11-1.el10.x86_64 \u3000\u3000\u3000 mariadb-server-utils-3:10.11.11-1.el10.x86_64<br>mysql-selinux-1.0.14-1.el10_0.noarch perl-DBD-MariaDB-1.23-10.el10.x86_64<br><br>\u5b8c\u4e86\u3057\u307e\u3057\u305f!<br><br><strong>\u6587\u5b57\u30b3\u30fc\u30c9\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210<\/strong> root@falcon21:~#\u00a0<strong>vi \/etc\/my.cnf.d\/charset.cnf<\/strong><br>[mysqld]<br>character-set-server = utf8mb4<br><br>[client]<br>default-character-set = utf8mb4<br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><strong>MariaDB\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6<\/strong><br>[root@falcon21 ~]#\u00a0<strong>vi \/etc\/my.cnf.d\/mariadb-server.cnf<\/strong><br><br>[mysqld]<br>datadir=\/var\/lib\/mysql<br>socket=\/var\/lib\/mysql\/mysql.sock<br>log-error=\/var\/log\/mariadb\/mariadb.log<br>pid-file=\/run\/mariadb\/mariadb.pid<br><strong>character-set-server = utf8mb4<\/strong>\u00a0\u3000\u2190\u3000\u8ffd\u52a0(MariaDB\u30b5\u30fc\u30d0\u30fc\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092utf8mb4\u306b\u3059\u308b<br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><strong>MariaDB\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6<\/strong><br>[root@falcon21 ~]#\u00a0<strong>vi \/etc\/my.cnf.d\/client.cnf<\/strong><br>[client]<br>default-character-set=utf8mb4<br><br><br>&#8212;&#8212;&#8212;&#8212;<br><br><strong>mariadb\u3000\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/strong><br>root@falcon21:~#\u00a0<strong>systemctl enable &#8211;now mariadb<\/strong><br>Created symlink &#8216;\/etc\/systemd\/system\/mysql.service&#8217; \u2192 &#8216;\/usr\/lib\/systemd\/system\/mariadb.service&#8217;.<br>Created symlink &#8216;\/etc\/systemd\/system\/mysqld.service&#8217; \u2192 &#8216;\/usr\/lib\/systemd\/system\/mariadb.service&#8217;.<br>Created symlink &#8216;\/etc\/systemd\/system\/multi-user.target.wants\/mariadb.service&#8217; \u2192 &#8216;\/usr\/lib\/systemd\/system\/mariadb.service&#8217;.<br><br><br>[root@falcon21 ~]# <strong>systemctl restart mariadb<\/strong><br>\u25cf mariadb.service &#8211; MariaDB 10.11 database server<br>\u3000\u3000\u3000\u3000Loaded: loaded (\/usr\/lib\/systemd\/system\/mariadb.service; <strong>enabled<\/strong>; preset: disabled)<br>\u3000\u3000\u3000\u3000Active: <strong>active (running)<\/strong> since Mon 2025-11-17 18:33:11 JST; 1min 5s ago<br>Invocation: 76833421f85b473191edf67ee76f5c8f<br>\u3000\u3000\u3000\u3000\u3000Docs: man:mariadbd(8)<br>\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000https:\/\/mariadb.com\/kb\/en\/library\/systemd\/<br>\u3000\u3000\u3000\u3000Process: 8382 ExecStartPre=\/usr\/libexec\/mariadb-check-socket (code=exited, status=0\/SUCCESS)<br>\u3000\u3000\u3000\u3000Process: 8404 ExecStartPre=\/usr\/libexec\/mariadb-prepare-db-dir mariadb.service (code=exited, status=0\/S><br>\u3000\u3000\u3000\u3000Process: 8451 ExecStartPost=\/usr\/libexec\/mariadb-check-upgrade (code=exited, status=0\/SUCCESS)<br>\u3000\u3000\u3000Main PID: 8440 (mariadbd)<br>\u3000\u3000\u3000\u3000\u3000Status: &#8220;Taking your SQL requests now&#8230;&#8221;<br>\u3000\u3000\u3000\u3000\u3000\u3000Tasks: 8 (limit: 47782)<br>\u3000\u3000\u3000\u3000\u3000Memory: 199.1M (peak: 201.1M)<br>\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000CPU: 152ms<br>\u3000\u3000\u3000CGroup: \/system.slice\/mariadb.service<br>\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2514\u25008440 \/usr\/libexec\/mariadbd &#8211;basedir=\/usr &#8211;skip-grant-tables<br><br>11\u6708 17 18:33:11 falcon21.space systemd[1]: Starting mariadb.service &#8211; MariaDB 10.11 database server&#8230;<br>11\u6708 17 18:33:11 falcon21.space mariadb-prepare-db-dir[8404]: Database MariaDB is probably initialized in \/><br>11\u6708 17 18:33:11 falcon21.space mariadb-prepare-db-dir[8404]: If this is not the case, make sure the \/var\/l><br>11\u6708 17 18:33:11 falcon21.space (mariadbd)[8440]: mariadb.service: Referenced but unset environment variabl><br>11\u6708 17 18:33:11 falcon21.space systemd[1]: Started mariadb.service &#8211; MariaDB 10.11 database server.<br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><strong>firewall\u3000\u8a2d\u5b9a<\/strong><br>root@falcon21:~#\u00a0<strong>firewall-cmd &#8211;add-service=mysql<\/strong><br>success<br><br>root@falcon21:~#\u00a0<strong>firewall-cmd &#8211;runtime-to-permanent<\/strong><br>success<br><br><strong>MariaDB \u521d\u671f\u8a2d\u5b9a<\/strong><br>root@falcon21:~#\u00a0<strong>mysql_secure_installation<\/strong><br><br>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<br>SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!<br>\u3000\u6ce8\u610f\uff1a\u672c\u756a\u74b0\u5883\u306e\u3059\u3079\u3066\u306eMariaDB\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5168\u90e8\u5206\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\u5404\u30b9\u30c6\u30c3\u30d7\u3092\u3088\u304f\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002<br><br>In order to log into MariaDB to secure it, we&#8217;ll need the current<br>password for the root user. If you&#8217;ve just installed MariaDB, and<br>haven&#8217;t set the root password yet, you should just press enter here.<br>\u3000MariaDB\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u78ba\u4fdd\u3059\u308b\u306b\u306f\u3001\u73fe\u5728\u306eroot\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002MariaDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u3067\u3001\u307e\u3060root\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u3053\u3053\u3067Enter\u30ad\u30fc\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br><br><br><strong>Enter current password for root<\/strong>\u00a0(enter for none):\u30fb\u30fb\u30fb\u3000<strong>root \u30d1\u30b9\u30ef\u30fc\u30c9<\/strong><br>OK, successfully used password, moving on&#8230;<br><br>Setting the root password or using the unix_socket ensures that nobody<br>can log into the MariaDB root user without the proper authorisation.<br>root \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u304b\u3001unix_socket \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u9069\u5207\u306a\u8a8d\u8a3c\u306a\u3057\u306b MariaDB \u306e root \u30e6\u30fc\u30b6\u30fc\u306b\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<br>You already have your root account protected, so you can safely answer &#8216;n&#8217;.<br>\u30eb\u30fc\u30c8\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u65e2\u306b\u4fdd\u8b77\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u300cn\u300d\u3068\u5b89\u5168\u306b\u7b54\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br><br><br><strong>Switch to unix_socket authentication<\/strong>\u00a0[Y\/n]\u3000\u30fb\u30fb\u30fb<strong>\uff4e\u3000\u3092enter<\/strong><br>&#8230; skipping.<br><br>You already have your root account protected, so you can safely answer &#8216;n&#8217;.<br>\u30eb\u30fc\u30c8\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u65e2\u306b\u4fdd\u8b77\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u300cn\u300d\u3068\u5b89\u5168\u306b\u7b54\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br><br><br><strong>Change the root password?<\/strong>\u00a0[Y\/n]\u3000\u30fb\u30fb\u30fb<strong>\uff4e\u3000\u3092enter<\/strong><br>&#8230; skipping.<br><br>By default, a MariaDB installation has an anonymous user, allowing anyone<br>to log into MariaDB without having to have a user account created for<br>them.<br>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001MariaDB\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u306a\u304f\u3066\u3082\u8ab0\u3067\u3082MariaDB\u306b\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3059\u3002<br>This is intended only for testing, and to make the installation<br>go a bit smoother. You should remove them before moving into a<br>production environment.<br>\u3053\u308c\u306f\u30c6\u30b9\u30c8\u306e\u307f\u3092\u76ee\u7684\u3068\u3057\u3066\u304a\u308a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5c11\u3057\u30b9\u30e0\u30fc\u30ba\u306b\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002\u5b9f\u7a3c\u50cd\u74b0\u5883\u306b\u79fb\u884c\u3059\u308b\u524d\u306b\u305d\u308c\u3089\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br><br><br><strong>Remove anonymous users? [<\/strong>Y\/n]\u3000<strong>\uff4e\u3000\u3092enter<\/strong>\u533f\u540d\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f<br>&#8230; skipping.<br><br>Normally, root should only be allowed to connect from &#8216;localhost&#8217;. This<br>ensures that someone cannot guess at the root password from the network.<br>\u901a\u5e38\u3001root \u306f\u300clocalhost\u300d\u304b\u3089\u306e\u307f\u63a5\u7d9a\u3092\u8a31\u53ef\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304b\u3089 root \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u63a8\u6e2c\u3055\u308c\u308b\u3053\u3068\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<br><br><strong>Disallow root login remotely? [<\/strong>Y\/n]\u3000<strong>\u7a7aenter<\/strong><br>DELETE FROM mysql.global_priv WHERE User=&#8217;root&#8217; AND Host NOT IN (&#8216;localhost&#8217;, &#8216;127.0.0.1&#8217;, &#8216;::1&#8217;)<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>ERROR 1142 (42000) at line 1: DELETE command denied to user &#8216;root&#8217;@&#8217;localhost&#8217; for table `mysql`.`global_priv`<br>&#8230; Failed!<br>1\u884c\u76ee\u306e\u30a8\u30e9\u30fc 1142 (42000): \u30c6\u30fc\u30d6\u30eb `mysql`.`global_priv` \u306b\u5bfe\u3059\u308b DELETE \u30b3\u30de\u30f3\u30c9\u304c\u30e6\u30fc\u30b6\u30fc &#8216;root&#8217;@&#8217;localhost&#8217; \u306b\u62d2\u5426\u3055\u308c\u307e\u3057\u305f&#8230; \u5931\u6557\u3057\u307e\u3057\u305f!<br><br>By default, MariaDB comes with a database named &#8216;test&#8217; that anyone can<br>access. This is also intended only for testing, and should be removed<br>before moving into a production environment.<br>MariaDB\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3001\u300ctest\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u4ed8\u5c5e\u3057\u3066\u304a\u308a\u3001\u8ab0\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3082\u30c6\u30b9\u30c8\u5c02\u7528\u3067\u3042\u308b\u305f\u3081\u3001\u672c\u756a\u74b0\u5883\u306b\u79fb\u884c\u3059\u308b\u524d\u306b\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br><br><br><strong>Remove test database and access to it?<\/strong>\u00a0[Y\/n]\u3000<strong>\u7a7aenter<\/strong><br>&#8211; Dropping test database&#8230;<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br>DROP DATABASE IF EXISTS test<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>ERROR 1044 (42000) at line 1: Access denied for user &#8216;root&#8217;@&#8217;localhost&#8217; to database &#8216;test&#8217;<br>&#8230; Failed! Not critical, keep moving&#8230;<br>&#8211; Removing privileges on test database&#8230;<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br>DELETE FROM mysql.db WHERE Db=&#8217;test&#8217; OR Db=&#8217;test\\_%&#8217;<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>ERROR 1142 (42000) at line 1: DELETE command denied to user &#8216;root&#8217;@&#8217;localhost&#8217; for table `mysql`.`db`<br>&#8230; Failed! Not critical, keep moving&#8230;<br><br>Reloading the privilege tables will ensure that all changes made so far<br>will take effect immediately.<br>\u6a29\u9650\u30c6\u30fc\u30d6\u30eb\u3092\u518d\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u3053\u308c\u307e\u3067\u306b\u52a0\u3048\u3089\u308c\u305f\u3059\u3079\u3066\u306e\u5909\u66f4\u304c\u3059\u3050\u306b\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<br><br><br><strong>Reload privilege tables now?\u00a0<\/strong>[Y\/n]\u3000<strong>y\u3092enter<\/strong><br>FLUSH PRIVILEGES<br>&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation<br>&#8230; Failed!<br><br>Cleaning up&#8230;<br><br>All done! If you&#8217;ve completed all of the above steps, your MariaDB<br>installation should now be secure.<br>\u5b8c\u4e86\u3067\u3059\uff01\u4e0a\u8a18\u306e\u624b\u9806\u3092\u3059\u3079\u3066\u5b8c\u4e86\u3059\u308b\u3068\u3001MariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b89\u5168\u306b\u306a\u308a\u307e\u3059\u3002<br><br><strong>Thanks for using MariaDB!<\/strong><br>[root@falcon21 ~]#<br><br>root@falcon21 ~]#\u00a0<strong>mysql -u root -p<\/strong><br>Welcome to the MariaDB monitor. Commands end with ; or \\g.<br>Your MariaDB connection id is 21<br>Server version: 10.11.11-MariaDB MariaDB Server<br><br>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br><br>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<br><br>MariaDB [(none)]> exit<br>Bye<br>[root@falcon21 ~]#<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>MySQL\u306e\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001MYSQLD_OPTS=&#8221;&#8211;skip-grant-tables&#8221;\u00a0\u3092\u8a2d\u5b9a\u3059\u308b\u3068<br>\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<br><\/strong><br><br><strong>root\u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u8a2d\u5b9a<\/strong><br><strong>mysqld\u3092\u505c\u6b62<\/strong><br>[root@falcon21 ~]# <strong>systemctl stop mysqld<\/strong><br><br><br><strong>MYSQLD_OPTS\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u5316<\/strong><br>[root@falcon21 ~]# <strong>systemctl set-environment MYSQLD_OPTS=&#8221;&#8211;skip-grant-tables&#8221;<\/strong><br><br><br><strong>mysqld\u3092\u518d\u8d77\u52d5<\/strong><br>[root@falcon21 ~]# <strong>systemctl restart mysqld<\/strong><br><br><br><strong>mysql\u306b\u5165\u308b<\/strong><br>[root@falcon21 ~]# <strong>mysql<\/strong><br>Welcome to the MariaDB monitor. Commands end with ; or \\g.<br>Your MariaDB connection id is 3<br>Server version: 10.11.11-MariaDB MariaDB Server<br><br>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br><br>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<br><br>MariaDB [(none)]> exit<br>Bye<br>[root@falcon21 ~]#<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br><strong>MariaDB\u3000\u78ba\u8a8d<\/strong>\u3000\u3000\u3000\u3000\u3000\u3000\u3000<br>[root@falcon21 ~]#<strong>\u00a0mysql<\/strong><br>Welcome to the MariaDB monitor. Commands end with ; or \\g.<br> Your MariaDB connection id is 4 <br>Server version: 10.11.11-MariaDB MariaDB Server<br><br> Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br><br> Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<br><br> MariaDB [(none)]> <strong>show grants for root@localhost;<\/strong> MariaDB [(none)]> <strong>select user,host,password from mysql.user;<\/strong><br><br>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<br>| User | Host | Password |<br>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<br>| mariadb.sys | localhost | |<br>| root | localhost | invalid |<br>| mysql | localhost | invalid |<br>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<br>3 rows in set (0.003 sec) <br>MariaDB [(none)]> <strong>exit<\/strong> <br>Bye<br> [root@falcon21 ~]#<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br><strong>MySQL\u30e6\u30fc\u30b6\u30fc\u8ffd\u52a0\u8a2d\u5b9a<\/strong><br>[root@falcon21 ~]# <strong>mysql<\/strong><br>Welcome to the MariaDB monitor. Commands end with ; or \\g.<br>Your MariaDB connection id is 3<br>Server version: 10.11.11-MariaDB MariaDB Server<br><br>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br><br>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<br><br><br># <strong>root | localhost | invalid |\u306a\u306e\u3067\u3001\u4e00\u65e6\u3001root \u3092\u524a\u9664\u3001<\/strong><br># <strong>root \u30e6\u30fc\u30b6\u30fc\u524a\u9664\u30fb\u518d\u8a2d\u5b9a<\/strong><br>MariaDB [(none)]> <strong>drop user &#8216;root&#8217;@&#8217;localhost&#8217;;<\/strong><br>ERROR 1290 (HY000): The MariaDB server is running with the &#8211;skip-grant-tables option so it cannot execute this statement MariaDB [(none)]><br><br>MariaDB [(none)]> <strong>create user &#8216;root&#8217;@&#8217;localhost&#8217; identified by &#8216;1234567890&#8217;;<\/strong><br>ERROR 1290 (HY000): The MariaDB server is running with the &#8211;skip-grant-tables option so it cannot execute this statement<br><br>MariaDB [(none)]> exit<br>Bye<br><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br><strong>&#8211;skip-grant-tables option \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u3001\u5143\u306b\u623b\u3059\u3002<\/strong><br><strong>\u5143\u306b\u623b\u3057\u3066\u3082 root \u3067\u3001mysq \u306b\u5165\u308b\u4e8b\u306f\u3067\u304d\u308b\u3002<\/strong><br><br>root@falcon21 ~]#\u00a0<strong>systemctl stop mysqld<\/strong><br>[root@falcon21 ~]#\u00a0<strong>systemctl set-environment MYSQLD_OPTS=&#8221;&#8221;<\/strong><br>[root@falcon21 ~]#<strong>\u00a0systemctl start mysqld<\/strong><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>\u30e6\u30fc\u30b6\u30fc\u518d\u8a2d\u5b9a<\/strong><br><strong>root\u306b\u7ba1\u7406\u8005\u6a29\u9650\u3092\u8a2d\u5b9a<\/strong><br><br>MariaDB [(none)]> <strong>ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;1234567890&#8217;;<\/strong><br>Query OK, 0 rows affected (0.015 sec)<br><br><strong>\u30e6\u30fc\u30b6\u30fc\u8ffd\u52a0<\/strong><br>MariaDB [(none)]> <strong>create user &#8216;xxxxxx&#8217;@&#8217;localhost&#8217; identified by &#8216;0987654321&#8217;;<\/strong><br>Query OK, 0 rows affected (0.018 sec)<br><br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MariaDB \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30ebroot@falcon21:~#\u00a0dnf -y install mariadb-server\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f:mariadb-3:10.11.11-1.el10.x86_64 \u3000\u3000\u3000\u3000\u3000\u3000\u3000 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-222","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=222"}],"version-history":[{"count":1,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/222\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/222\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}