{"id":411,"date":"2022-07-22T21:40:24","date_gmt":"2022-07-22T13:40:24","guid":{"rendered":"http:\/\/nas.hepcloud.top:7000\/?p=411"},"modified":"2022-07-22T21:40:24","modified_gmt":"2022-07-22T13:40:24","slug":"ubuntu22-04%e5%ae%89%e8%a3%85mysql8","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=411","title":{"rendered":"ubuntu22.04\u5b89\u88c5mysql8"},"content":{"rendered":"<h3>ubuntu22.04\u5b89\u88c5mysql8<\/h3>\n<pre><code class=\"language-shell\">#\u4e5f\u53ef\u4ee5\u8bbf\u95eehttps:\/\/dev.mysql.com\/downloads\/repo\/apt\/\u83b7\u53d6\u914d\u7f6e\u5305\nwget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.14-1_all.deb\n\n#\u6267\u884c\u6b64\u5b89\u88c5\u914d\u7f6e\u5305\ndpkg -i mysql-apt-config_0.8.14-1_all.deb\n\n#\u66f4\u65b0\napt-get update\n\n#\u5b89\u88c5mysqlserver\napt-get install mysql-server\n\n#\u5b89\u88c5mysqlclient\napt-get install mysql-client\n\n#\u767b\u9646mysql\nmysql -uroot -p\n\n#\u4fee\u6539root\u5bc6\u7801\nALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY &#039;123456&#039;;\n\n#\u5982\u679c\u4fee\u6539\u4e0d\u6210\u529f\uff0c\u53ef\u4ee5\u6267\u884c\u4e0b\u9762\u8fd9\u4e00\u53e5\ncreate user &#039;root&#039;@&#039;%&#039; identified by &#039;123456&#039;;\n\n#\u6388\u6743\u6240\u6709\u64cd\u4f5c\u6743\u9650\u7ed9root\ngrant all privileges on *.* to &#039;root&#039;@&#039;%&#039;;\n\n#\u521b\u5efa\u4e00\u4e2ahep\u7528\u6237\uff0c\u5e76\u6388\u6743\u6240\u6709\u64cd\u4f5c\u6743\u9650\ncreate user &#039;hep&#039;@&#039;%&#039; identified by &#039;123456&#039;;\ngrant all privileges on *.* to &#039;hep&#039;@&#039;%&#039;;\n\n#\u5237\u65b0\u6743\u9650\nflush privileges;\n\n#\u9000\u51fa\nexit;\n\n#\u4f7f\u5f97mysql\u53ef\u4ee5\u8fdc\u7a0b\u767b\u9646\nvim \/etc\/mysql\/mysql.conf.d\/mysqld.cnf\n#\u6ce8\u91ca\u6389\u8fd9\u4e00\u884c\n#bind-address = 127.0.0.1\n\n#\u91cd\u542fmysql\nservice mysql restart;\n\n#\u5f00\u653e3306\u7aef\u53e3\nufw allow 3306\n\n#\u67e5\u770b3306\u7aef\u53e3\u662f\u5426\u88ab\u76d1\u542c\nnetstat -anp | grep mysql<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu22.04\u5b89\u88c5mysql8 #\u4e5f\u53ef\u4ee5\u8bbf\u95eehttps:\/\/dev.mysql.com\/downloa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=411"}],"version-history":[{"count":0,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/411\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}