{"id":783,"date":"2014-12-11T02:48:16","date_gmt":"2014-12-10T17:48:16","guid":{"rendered":"http:\/\/blog.tanitanin.net\/?p=783"},"modified":"2015-01-01T16:03:52","modified_gmt":"2015-01-01T07:03:52","slug":"mysql%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e5%85%a5%e5%8a%9b%e5%b1%a5%e6%ad%b4%e3%82%92%e6%b6%88%e3%81%99","status":"publish","type":"post","link":"https:\/\/blog.tanitanin.net\/?p=783","title":{"rendered":"mysql \u30b3\u30de\u30f3\u30c9\u306e\u5165\u529b\u5c65\u6b74\u3092\u6d88\u3059"},"content":{"rendered":"<p>CentOS 7 \u306b MariaDB \u3092\u5165\u308c\u308b\u3068\uff0c\u306f\u3058\u3081\u306broot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306bmysql\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\uff0e<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8a2d\u5b9a\u306e\u6b73\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\uff0e<\/p>\n<pre>\n~$ mysql -uroot\n\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\n\n...\n\nMariaDB [(none)]> show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n+--------------------+\n3 rows in set (0.01 sec)\n\nMariaDB [(none)]> SELECT user,host,password FROM mysql.user;\n+------+-----------+----------+\n| user | host      | password |\n+------+-----------+----------+\n| root | localhost |          |\n| root | 127.0.0.1 |          |\n| root | ::1       |          |\n+------+-----------+----------+\n3 rows in set (0.00 sec)\n\nMariaDB [none]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('hogehogehoge');\nQuery OK, 0 rows affected (0.00 sec)\n<\/pre>\n<p>\u3053\u306e\u3068\u304d\uff0c\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;hogehogehoge&#8217;\u3092\u5e73\u6587\u3067\u5165\u529b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\uff0c\u5c65\u6b74\u3092\u305f\u3069\u308b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5206\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e<\/p>\n<h2>\u76ee\u7684<\/h2>\n<p>mysql\u30b3\u30de\u30f3\u30c9\u5185\u3067\u306e\u5165\u529b\u5c65\u6b74\u3092\u6d88\u3059<\/p>\n<h2>\u65b9\u6cd5<\/h2>\n<p>mysql\u30b3\u30de\u30f3\u30c9\u3067\u306e\u5165\u529b\u5c65\u6b74\u306f &#8221; $HOME\/.mysql_history &#8221; \u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\uff0e<br \/>\nsudo\u3067mysql\u3092\u5b9f\u884c\u3057\u305f\u5834\u5408\u306f\uff0c\u4ee5\u4e0b\u306e\u8981\u9818\u3067\u5c65\u6b74\u3092\u6d88\u305b\u307e\u3059\uff0e<\/p>\n<pre>\n$ sudo rm -rf \/root\/.mysql_history\n<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3054\u3068\u6d88\u3057\u3066\u3082\uff0c\u307e\u305fmysql\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u305f\u3089\u52dd\u624b\u306b\u751f\u6210\u3055\u308c\u307e\u3059(\u30fb\u2200\u30fb)<\/p>\n<h3>\u53c2\u8003:<\/h3>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/4561292\/how-to-clear-query-cache-in-mysql\">StackOverflow &#8211; How to clear query cache in mysql?<\/a><br \/>\n<a href=\"http:\/\/www.cyberciti.biz\/faq\/howto-clear-mysql-command-history\/\">Clear mysql command line history stored in ~\/.mysql_history file<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 \u306b MariaDB \u3092\u5165\u308c\u308b\u3068\uff0c\u306f\u3058\u3081\u306broot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306bmysql\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\uff0e \u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8a2d\u5b9a\u306e\u6b73\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\uff0e ~$ mysql -uroot W [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-783","post","type-post","status-publish","format-standard","hentry","category-1"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lSjy-cD","jetpack-related-posts":[{"id":557,"url":"https:\/\/blog.tanitanin.net\/?p=557","url_meta":{"origin":783,"position":0},"title":"VMWare\u306bArch Linux\u3092\u5165\u308c\u3066\u307f\u305f","author":"tanitanin","date":"2014\u5e748\u670816\u65e5","format":false,"excerpt":"VMWare\u306bArch Linux\u3092\u5165\u308c\u3066\u307f\u307e\u3057\u305f\uff0e \u30d0\u30fc\u30b8\u30e7\u30f3\u306f2014.08.01\u3067\u3057\u305f\uff0e \u53c2\u8003\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":713,"url":"https:\/\/blog.tanitanin.net\/?p=713","url_meta":{"origin":783,"position":1},"title":"\u3055\u304f\u3089VPS\u306b CentOS 7 \u3092\u5165\u308c\u307e\u3057\u305f","author":"tanitanin","date":"2014\u5e7411\u670816\u65e5","format":false,"excerpt":"CentOS 6 \u3067\u904b\u7528\u3057\u3066\u3044\u305f tanitanin.net \u3067\u3059\u304c\uff0c\u6570\u65e5\u524d\uff0c\u666e\u6bb5ssh\u3067\u4f7f\u3063\u3066\u3044\u308b\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":249,"url":"https:\/\/blog.tanitanin.net\/?p=249","url_meta":{"origin":783,"position":2},"title":"Django1.4.3\u3092Cygwin+XAMPP\u3067\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30e1\u30e2","author":"tanitanin","date":"2013\u5e741\u670826\u65e5","format":false,"excerpt":"Django 1.4.3\u3092Cygwin\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u306e\u30e1\u30e2 manage.py syncdb\u2026","rel":"","context":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","block_context":{"text":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","link":"https:\/\/blog.tanitanin.net\/?cat=64"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":762,"url":"https:\/\/blog.tanitanin.net\/?p=762","url_meta":{"origin":783,"position":3},"title":"Gitit \u3092 systemd \u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u8d77\u52d5\u3059\u308b","author":"tanitanin","date":"2014\u5e7411\u670818\u65e5","format":false,"excerpt":"\u3055\u304f\u3089VPS\u306eOS\u3092CentOS7\u306b\u3057\u305f\u306e\u3067\uff0cWiki\u3082\u65b0\u3057\u304f\u3057\u3088\u3046\u3068\u601d\u3044Gitit\u3092\u52d5\u304b\u3057\u59cb\u3081\u307e\u3057\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":952,"url":"https:\/\/blog.tanitanin.net\/?p=952","url_meta":{"origin":783,"position":4},"title":"NuGet\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b","author":"tanitanin","date":"2017\u5e745\u670831\u65e5","format":false,"excerpt":"NuGet\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306f2\u901a\u308a\u3042\u308a\u307e\u3059\u3002 NuGet Package Explorer \u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":847,"url":"https:\/\/blog.tanitanin.net\/?p=847","url_meta":{"origin":783,"position":5},"title":"CentOS 7 \u306b Play Framework 2.3 \u3092\u5165\u308c\u308b","author":"tanitanin","date":"2015\u5e742\u670815\u65e5","format":false,"excerpt":"Scala\u3067Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308b\u306e\u306b\u3088\u304f\u7528\u3044\u3089\u308c\u308b\u3089\u3057\u3044\uff0cPlay\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=783"}],"version-history":[{"count":5,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/783\/revisions"}],"predecessor-version":[{"id":796,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/783\/revisions\/796"}],"wp:attachment":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}