{"id":20,"date":"2006-11-15T10:11:58","date_gmt":"2006-11-15T02:11:58","guid":{"rendered":"http:\/\/140.123.23.69\/blog\/?p=20"},"modified":"2007-04-18T10:04:21","modified_gmt":"2007-04-18T02:04:21","slug":"mysql-%e5%ae%89%e8%a3%9d-for-linux","status":"publish","type":"post","link":"https:\/\/blog.smallken.site\/?p=20","title":{"rendered":"MYSQL \u5b89\u88dd for Linux"},"content":{"rendered":"<p>* MySQL \u4e3b\u9801 ( \u82f1\u6587 )\uff1a<a href=\"http:\/\/www.mysql.com\/\">http:\/\/www.mysql.com\/<\/a><br \/>\n* MySQL \u4e3b\u9801\u4e0b\u8f09\uff1a<a href=\"http:\/\/www.mysql.com\/downloads\/mysql-3.23.html\">http:\/\/www.mysql.com\/downloads\/mysql-3.23.html<\/a><br \/>\n* \u53f0\u7063\u6620\u8a2d\u7ad9\u53f0\uff1a<a href=\"http:\/\/ftp.nsysu.edu.tw\/Unix\/Database\/MySql\/downloads\/\">http:\/\/ftp.nsysu.edu.tw\/Unix\/Database\/MySql\/downloads\/<\/a><br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\u4ee5\u4e0b\u662f\u6839\u64da\u5b98\u65b9\u7db2\u7ad9\u7684\u6a19\u6e96\u5b89\u88dd\u7a0b\u5e8f<\/p>\n<p>\u203b\u6ce8\u610f\u4e8b\u9805<\/p>\n<p>You may see the following error message when you run mysql_install_db:<\/p>\n<p>Sorry, the host &#8216;xxxx&#8217; could not be looked up<\/p>\n<p>You can deal with this by executing mysql_install_db &#8211;force,<br \/>\nwhich does not execute the resolveip test in mysql_install_db.<br \/>\nThe downside is that you cannot use hostnames in the grant tables:<br \/>\nexcept for localhost, you must use IP numbers instead. If you are<br \/>\nusing an old version of MySQL that does not support &#8211;force, you must<br \/>\nmanually remove the resolveip test in mysql_install using a text editor<\/p>\n<p>\u610f\u601d\u662f\u8aaa\uff0c\u5982\u679c\u4e3b\u6a5f\u6c92\u6709domain name , \u628a hostname \u6539\u6210 127.0.0.1, \u6216\u8005\u52a0\u5165 &#8211;force \u53c3\u6578<\/p>\n<p>\u203b\u958b\u59cb\u5b89\u88dd<\/p>\n<p>shell&gt; groupadd mysql<br \/>\nshell&gt; useradd -g mysql mysql<br \/>\nshell&gt; tar zxvf mysql-standard-5.0.18-linux-i686-glibc23.tar.gz -C \/usr\/local\/<br \/>\nshell&gt; cd \/usr\/local<br \/>\nshell&gt; ln -s full-path-to-mysql-VERSION-OS mysql<br \/>\nshell&gt; cd mysql<br \/>\nshell&gt; scripts\/mysql_install_db &#8211;user=mysql<br \/>\nshell&gt; chown -R root . \/\/ pwd = \/usr\/local\/msyql<br \/>\nshell&gt; chown -R mysql data<br \/>\nshell&gt; chgrp -R mysql .<br \/>\nshell&gt; bin\/mysqld_safe &#8211;user=mysql &amp;<\/p>\n<p>\u958b\u6a5f\u81ea\u52d5\u555f\u52d5\u5728 \/etc\/rc.local \u52a0\u5165<br \/>\ncd \/usr\/local\/mysql; \/usr\/local\/mysql\/bin\/safe_mysqld &#8211;user=mysql &amp;<\/p>\n<p>vi \/etc\/profile<br \/>\nPATH=&#8221;$PATH&#8221;:\/usr\/local\/mysql\/bin \/\/ \u52a0 PATH<br \/>\nvi \/etc\/man.config<br \/>\nMANPATH \/usr\/local\/mysql\/man \/\/ \u52a0\u5165 man path<\/p>\n<p>\u5efa\u7acb mysql \u7684 root \u5bc6\u78bc<\/p>\n<p>\u65b9\u6cd5\u4e00\uff1a<\/p>\n<p># \/usr\/local\/mysql\/bin\/mysqladmin -u root password &#8216;your.password&#8217;<br \/>\n# \/usr\/local\/mysql\/bin\/mysql -u root -p \/\/ \u767b\u5165\u65b9\u6cd5<\/p>\n<p>\u65b9\u6cd5\u4e8c\uff1a<\/p>\n<p>\u65b9\u6cd5\u4e00\u76f4\u63a5\u5728shell\u4e2d\u8f38\u5165\u5bc6\u78bc\uff0c\u6307\u4ee4\u6703\u88ab\u7cfb\u7d71\u8a18\u9304\u4e0b\u4f86\uff0c\u6bd4\u8f03\u4e0d\u5b89\u5168\uff0c\u5b89\u5168\u7684\u65b9\u6cd5<\/p>\n<p># \/usr\/local\/mysql\/bin\/mysql<\/p>\n<p>&gt;use mysql<br \/>\n&gt;update user set password=password(&#8220;\u65b0\u5bc6\u78bc&#8221;) where user=&#8221;root&#8221;;<br \/>\n&gt;flush privileges;<br \/>\n&gt;exit;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>* MySQL \u4e3b\u9801 ( \u82f1\u6587 )\uff1ahttp:\/\/www.mysql.com\/ * MySQL \u4e3b\u9801\u4e0b\u8f09\uff1aht&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":0,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}