{"id":32,"date":"2011-09-24T00:46:00","date_gmt":"2011-09-23T15:46:00","guid":{"rendered":"http:\/\/yokensaka.com\/centos\/?p=32"},"modified":"2014-07-19T20:13:26","modified_gmt":"2014-07-19T11:13:26","slug":"%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9%e3%82%b5%e3%83%bc%e3%83%90mysql","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/centos\/?p=32","title":{"rendered":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0(MySQL)"},"content":{"rendered":"<p>MySQL \u306f\u9ad8\u901f\u6027\u3068\u5805\u7262\u6027\u3092\u8ffd\u53ca\u3057\u305f\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fb\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\uff33\uff31\uff2c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3001 \u4e16\u754c\u3067\u6700\u3082\u4eba\u6c17\u306e\u3042\u308b\u30d5\u30ea\u30fc\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u3002 Movable Type\u3068\u304bNucleus\u7b49\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u5404\u7a2e\u30c7\u30fc\u30bf\u3092MySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u306fMySQL\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u3002<br \/>\n<b>\u25a0MySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/b><\/p>\n<pre>\r\nmysql-server\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n[root@server1 ~]# yum -y install mysql-server\r\n<\/pre>\n<p><b>\u25a0MySQL\u8a2d\u5b9a<\/b><br \/>\nMySQL\u30b5\u30fc\u30d0\u30fc\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3068MySQL\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092UTF-8\u306b\u3059\u308b<\/p>\n<pre>[root@server1 ~]# vi \/etc\/my.cnf\r\n[mysqld]\r\ndatadir=\/var\/lib\/mysql\r\nsocket=\/var\/lib\/mysql\/mysql.sock\r\nuser=mysql\r\n# Disabling symbolic-links is recommended to prevent assorted security risks\r\nsymbolic-links=0\r\ndefault-character-set = utf8   \u2190\u3000\u8ffd\u52a0\r\n[mysqld_safe]\r\nlog-error=\/var\/log\/mysqld.log\r\npid-file=\/var\/run\/mysqld\/mysqld.pid\r\n\u6700\u7d42\u884c\u306b\u8ffd\u52a0\r\n[mysql]\r\ndefault-character-set = utf8<\/pre>\n<p><b>\u25a0MySQL\u8d77\u52d5<\/b><\/p>\n<pre>\r\nMySQL\u306e\u8d77\u52d5\r\n[root@server1 ~]# \/etc\/init.d\/mysqld start\r\nMySQL \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u521d\u671f\u5316\u4e2d:  Installing MySQL system tables...\r\nOK\r\nFilling help tables...\r\nOK\r\nTo start mysqld at boot time you have to copy\r\nsupport-files\/mysql.server to the right place for your system\r\nPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !\r\nTo do so, start the server, then issue the following commands:\r\n\/usr\/bin\/mysqladmin -u root password 'new-password'\r\n\/usr\/bin\/mysqladmin -u root -h server1.yokensaka.com password 'new-password'\r\nAlternatively you can run:\r\n\/usr\/bin\/mysql_secure_installation\r\nwhich will also give you the option of removing the test\r\ndatabases and anonymous user created by default.  This is\r\nstrongly recommended for production servers.\r\nSee the manual for more instructions.\r\nYou can start the MySQL daemon with:\r\ncd \/usr ; \/usr\/bin\/mysqld_safe &amp;\r\nYou can test the MySQL daemon with mysql-test-run.pl\r\ncd \/usr\/mysql-test ; perl mysql-test-run.pl\r\nPlease report any problems with the \/usr\/bin\/mysqlbug script!\r\n[  OK  ]\r\nmysqld \u3092\u8d77\u52d5\u4e2d:                                           [  OK  ]\r\n<\/pre>\n<p><b>\u25a0MySQL\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/b><\/p>\n<pre>\r\nMySQL\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\r\n[root@server1 ~]# chkconfig mysqld on\r\nMySQL\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u78ba\u8a8d\r\n[root@server1 ~]# chkconfig --list mysqld\r\nmysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30e9\u30f3\u30ec\u30d9\u30eb2\uff5e5\u304c\u30aa\u30f3\u306e\u72b6\u614b\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\r\n<\/pre>\n<p><b>\u25a0root\u30e6\u30fc\u30b6\u3078\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a<\/b><br \/>\nMySQL\u306eroot\u30e6\u30fc\u30b6\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5b89\u5168\u306e\u305f\u3081\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3002<\/p>\n<pre>\r\nMySQL\u30b5\u30fc\u30d0\u30fc\u3078root\u30e6\u30fc\u30b6\u3067\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root\r\n[root@server1 higo]# mysql -u root\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\u767b\u9332\u6e08\u30e6\u30fc\u30b6\u53ca\u3073\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d\r\nmysql&gt; select user,host,password from mysql.user;\r\n+------+-----------------------+----------+\r\n| user | host                  | password |\r\n+------+-----------------------+----------+\r\n| root | localhost             |          |\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\r\n| root | server1.yokensaka.com |          |\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\r\n| root | 127.0.0.1             |          |\r\n|      | localhost             |          |\r\n|      | server1.yokensaka.com |          |\r\n+------+-----------------------+----------+\r\n5 rows in set (0.00 sec)\r\nlocalhost\u306eroot\u30e6\u30fc\u30b6\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\r\nmysql&gt; set password for root@localhost=password('\u30d1\u30b9\u30ef\u30fc\u30c9');\r\nQuery OK, 0 rows affected (0.00 sec)\r\nserver1.yokensaka.com\u306eroot\u30e6\u30fc\u30b6\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\r\nmysql&gt; set password for root@server1.yokensaka.com=password('\u30d1\u30b9\u30ef\u30fc\u30c9');\r\nQuery OK, 0 rows affected (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u3044\u3063\u305f\u3093\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\nroot\u30e6\u30fc\u30b6\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3042\u308a\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\u767b\u9332\u6e08\u30e6\u30fc\u30b6\u53ca\u3073\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d\r\nmysql&gt; select user,host,password from mysql.user;\r\n+------+-----------------------+-------------------------------------------+\r\n| user | host                  | password                                  |\r\n+------+-----------------------+-------------------------------------------+\r\n| root | localhost             | *4202C8EE0ABB7FD2186E1CB0180B55C5272A8556 |\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u305f\r\n| root | server1.yokensaka.com | *4202C8EE0ABB7FD2186E1CB0180B55C5272A8556 |\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u305f\r\n| root | 127.0.0.1             |                                           |\r\n|      | localhost             |                                           |\r\n|      | server1.yokensaka.com |                                           |\r\n+------+-----------------------+-------------------------------------------+\r\n5 rows in set (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u3044\u3063\u305f\u3093\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\n<\/pre>\n<p>\u203b\u30c9\u30e1\u30a4\u30f3\u306b\u30cf\u30a4\u30d5\u30f3\uff08-\uff09\u304c\u5165\u3063\u3066\u308b\u5834\u5408\u306f\u30c9\u30e1\u30a4\u30f3\u3092\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3080<br \/>\n<b>\u25a0\u533f\u540d\u30e6\u30fc\u30b6\u306e\u524a\u9664<\/b><br \/>\nMySQL\u306b\u306f\u533f\u540d\u30e6\u30fc\u30b6\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u767b\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u5b89\u5168\u306e\u305f\u3081\u306b\u3053\u306e\u30e6\u30fc\u30b6\u3092\u524a\u9664\u3002<\/p>\n<pre>\r\nroot\u30e6\u30fc\u30b6\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3042\u308a\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 6\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\u767b\u9332\u30e6\u30fc\u30b6\u306e\u78ba\u8a8d\r\nmysql&gt; select user,host from mysql.user;\r\n+------+-----------------------+\r\n| user | host                  |\r\n+------+-----------------------+\r\n| root | 127.0.0.1             |\r\n|      | localhost             |\r\n| root | localhost             |\r\n|      | server1.yokensaka.com |\r\n| root | server1.yokensaka.com |\r\n+------+-----------------------+\r\n5 rows in set (0.00 sec)\r\n\u533f\u540d\u30e6\u30fc\u30b6\u3092\u524a\u9664\r\nmysql&gt; delete from mysql.user where user='';\r\nQuery OK, 2 rows affected (0.00 sec)\r\n\u533f\u540d\u30e6\u30fc\u30b6\u304c\u524a\u9664\u3055\u308c\u3066\u308b\u304b\u78ba\u8a8d\r\nmysql&gt; select user,host from mysql.user;\r\n+------+-----------------------+\r\n| user | host                  |\r\n+------+-----------------------+\r\n| root | 127.0.0.1             |\r\n| root | localhost             |\r\n| root | server1.yokensaka.com |\r\n+------+-----------------------+\r\n3 rows in set (0.01 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u3044\u3063\u305f\u3093\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\n\u533f\u540d\u30e6\u30fc\u30b6\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\r\n[root@server1 ~]# mysql\r\nERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)\r\n<\/pre>\n<p><b>\u25a0test\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u524a\u9664<\/b><br \/>\nMySQL\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067test\u3068\u3044\u3046\u7a7a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u4e0d\u8981\u306e\u305f\u3081\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664\u3002<\/p>\n<pre>\r\nroot\u30e6\u30fc\u30b6\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 8\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\u767b\u9332\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u78ba\u8a8d\r\nmysql&gt; show databases;\r\n+--------------------+\r\n| Database           |\r\n+--------------------+\r\n| information_schema |\r\n| mysql              |\r\n| test               |\r\n+--------------------+\r\n3 rows in set (0.00 sec)\r\ntest\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664\r\nmysql&gt; drop database test;\r\nQuery OK, 0 rows affected (0.00 sec)\r\ntest\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u524a\u9664\u3055\u308c\u3066\u308b\u304b\u78ba\u8a8d\r\nmysql&gt; show databases;\r\n+--------------------+\r\n| Database           |\r\n+--------------------+\r\n| information_schema |\r\n| mysql              |\r\n+--------------------+\r\n2 rows in set (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\n<\/pre>\n<p><b>\u25a0MySQL\u78ba\u8a8d<\/b><\/p>\n<pre>\r\nroot\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\ntaka\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u5168\u3066\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u6301\u3063\u305f\u3001\u65b0\u898f\u30e6\u30fc\u30b6taka\u3092\u767b\u9332\r\nmysql&gt; grant all privileges on taka.* to taka@localhost identified by '\u30d1\u30b9\u30ef\u30fc\u30c9';\r\nQuery OK, 0 rows affected (0.00 sec)\r\nmysql&gt; select user from mysql.user where user='taka';\u3000\u2190\u3000taka\u30e6\u30fc\u30b6\u767b\u9332\u78ba\u8a8d\r\n+--------+\r\n| user   |\r\n+--------+\r\n| taka   |\r\n+--------+\r\n1 row in set (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\ntaka\u30e6\u30fc\u30b6\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u taka -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\nmysql&gt; create database taka;\u3000\u2190\u3000taka\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\r\nQuery OK, 1 row affected (0.00 sec)\r\nmysql&gt; show databases;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u78ba\u8a8d\r\n+--------------------+\r\n| Database           |\r\n+--------------------+\r\n| information_schema |\r\n| taka               |\r\n+--------------------+\r\n2 rows in set (0.00 sec)\r\nmysql&gt; use taka\u3000\u2190\u3000taka\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u63a5\u7d9a\r\nDatabase changed\r\nmysql&gt; create table taka(num int, name varchar(50));\u3000\u2190\u3000taka\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\r\nQuery OK, 0 rows affected (0.01 sec)\r\nmysql&gt; show tables;\u3000\u2190\u3000\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u78ba\u8a8d\r\n+----------------+\r\n| Tables_in_test |\r\n+----------------+\r\n| taka           |\r\n+----------------+\r\n1 row in set (0.00 sec)\r\nmysql&gt; insert into taka values(1,'\u30c7\u30fc\u30bfAB');\u3000\u2190\u3000taka\u30c6\u30fc\u30d6\u30eb\u3078\u30c7\u30fc\u30bf\u767b\u9332\r\nQuery OK, 1 row affected (0.00 sec)\r\nmysql&gt; select * from taka;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u767b\u9332\u78ba\u8a8d\r\n+------+----------+\r\n| num  | name     |\r\n+------+----------+\r\n|    1 | \u30c7\u30fc\u30bfAB |\r\n+------+----------+\r\n1 row in set (0.01 sec)\r\nmysql&gt; update taka set name='\u30c7\u30fc\u30bfAB';\u3000\u2190\u3000taka\u30c6\u30fc\u30d6\u30eb\u5185\u30c7\u30fc\u30bf\u66f4\u65b0\r\nQuery OK, 1 row affected (0.00 sec)\r\nRows matched: 1  Changed: 0  Warnings: 0\r\nmysql&gt; select * from taka;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u66f4\u65b0\u78ba\u8a8d\r\n+------+----------+\r\n| num  | name     |\r\n+------+----------+\r\n|    1 | \u30c7\u30fc\u30bfAB |\r\n+------+----------+\r\n1 row in set (0.00 sec)\r\nmysql&gt; delete from taka where num=1;\u3000\u2190\u3000taka\u30c6\u30fc\u30d6\u30eb\u5185\u30c7\u30fc\u30bf\u524a\u9664\r\nQuery OK, 1 row affected (0.02 sec)\r\nmysql&gt; select * from taka;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u524a\u9664\u78ba\u8a8d\r\nEmpty set (0.00 sec)\r\nmysql&gt; drop table taka;\u3000\u2190\u3000test\u30c6\u30fc\u30d6\u30eb\u524a\u9664\r\nQuery OK, 0 rows affected (0.00 sec)\r\nmysql&gt; show tables;\u3000\u2190\u3000\u30c6\u30fc\u30d6\u30eb\u524a\u9664\u78ba\u8a8d\r\nEmpty set (0.00 sec)\r\nmysql&gt; drop database taka;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9taka\u524a\u9664\r\nQuery OK, 0 rows affected (0.00 sec)\r\nmysql&gt; show databases;\u3000\u2190\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u524a\u9664\u78ba\u8a8d\r\n+--------------------+\r\n| Database           |\r\n+--------------------+\r\n| information_schema |\r\n+--------------------+\r\n1 row in set (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\nroot\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\ntaka\u30e6\u30fc\u30b6\u304b\u3089\u5168\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u5265\u596a\r\nmysql&gt; revoke all privileges on *.* from taka@localhost;\r\nQuery OK, 0 rows affected (0.00 sec)\r\ntaka\u30e6\u30fc\u30b6\u524a\u9664\r\nmysql&gt; delete from mysql.user where user='taka' and host='localhost';\r\nQuery OK, 1 row affected (0.03 sec)\r\ntaka\u30e6\u30fc\u30b6\u524a\u9664\u78ba\u8a8d\r\nmysql&gt; select user from mysql.user where user='taka';\r\nEmpty set (0.00 sec)\r\nmysql&gt; flush privileges;\u3000\u2190\u3000taka\u30e6\u30fc\u30b6\u306e\u524a\u9664\u3092MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u53cd\u6620\r\nQuery OK, 0 rows affected (0.02 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\n<\/pre>\n<p><b>\u25a0\u6587\u5b57\u30bb\u30c3\u30c8\u306e\u78ba\u8a8d<\/b><br \/>\nMySQL\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u7b49\u304c\u6587\u5b57\u5316\u3051\u3057\u305f\u3068\u304d\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b5\u30fc\u30d0\u30fc\u304c\u6301\u3063\u3066\u3044\u308b\u6587\u5b57\u30bb\u30c3\u30c8\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u6301\u3063\u3066\u3044\u308b\u6587\u5b57\u30bb\u30c3\u30c8\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n<pre>[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 22\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\nmysql&gt; show variables like 'character\\_set\\_%';\r\n+--------------------------+--------+\r\n| Variable_name            | Value  |\r\n+--------------------------+--------+\r\n| character_set_client     | utf8   |\r\n| character_set_connection | utf8   |\r\n| character_set_database   | utf8   |\r\n| character_set_filesystem | binary |\r\n| character_set_results    | utf8   |\r\n| character_set_server     | utf8   |\r\n| character_set_system     | utf8   |\r\n+--------------------------+--------+\r\n7 rows in set (0.00 sec)<\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u308b\u9805\u76ee<br \/>\ncharacter_set_client<br \/>\ncharacter_set_connection<br \/>\ncharacter_set_results<br \/>\n\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u308b\u9805\u76ee<br \/>\ncharacter_set_database<br \/>\ncharacter_set_server<br \/>\n<b>\u25a0Movable Type\u306e\u521d\u671f\u8a2d\u5b9a<\/b><br \/>\nMovable Type\u306e\u30d6\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre>\r\nroot\u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3078\u30ed\u30b0\u30a4\u30f3\r\n[root@server1 ~]# mysql -u root -p\u30d1\u30b9\u30ef\u30fc\u30c9\r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 2\r\nServer version: 5.1.52 Source distribution\r\nCopyright (c) 2000, 2010, Oracle and\/or its affiliates. All rights reserved.\r\nThis software comes with ABSOLUTELY NO WARRANTY. This is free software,\r\nand you are welcome to modify and redistribute it under the GPL v2 license\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\nmysql&gt;\r\n\u300cmt\u300d\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\r\nmysql&gt; create database mt;\r\nQuery OK, 1 row affected (0.01 sec)\r\n\u7ba1\u7406DB\u3092\u30c7\u30d5\u30a9\u30eb\u30c8(\u7ba1\u7406\u3092\u30ab\u30ec\u30f3\u30c8)\r\nmysql&gt; use mysql;\r\nReading table information for completion of table and column names\r\nYou can turn off this feature to get a quicker startup with -A\r\nDatabase changed\r\n\u300cmt\u300d\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\r\nmysql&gt; grant usage on mt.* to higo@localhost identified by '\u30d1\u30b9\u30ef\u30fc\u30c9';\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\u300cmt\u300d\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u3059\u3079\u3066\u306e\u6a29\u9650\u3092\u300chigo\u300d\u306b\u8a31\u3059\r\nmysql&gt; grant all on mt.* to higo@localhost;\r\nQuery OK, 0 rows affected (0.00 sec)\r\nmysql&gt; exit\u3000\u2190\u3000\u30ed\u30b0\u30a2\u30a6\u30c8\r\nBye\r\n<\/pre>\n<div align=right><a href=\"#\">\u25b2 \u30da\u30fc\u30b8\u30c8\u30c3\u30d7\u3078<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>MySQL \u306f\u9ad8\u901f\u6027\u3068\u5805\u7262\u6027\u3092\u8ffd\u53ca\u3057\u305f\u30de\u30eb\u30c1\u30e6\u30fc\u30b6\u30fb\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\uff33\uff31\uff2c\u30c7\u30fc\u30bf &hellip; <a href=\"http:\/\/yokensaka.com\/centos\/?p=32\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":1,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":237,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions\/237"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}