{"id":122555,"date":"2018-10-08T08:35:43","date_gmt":"2018-10-08T00:35:43","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=122555"},"modified":"2018-09-30T19:37:06","modified_gmt":"2018-09-30T11:37:06","slug":"fedora-mysql8","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/fedora-mysql8.html","title":{"rendered":"Fedora server \u5b89\u88c5Mysql8"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nMySQL\u662f\u4e00\u79cd\u5173\u7cfb\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff08RDBMS\uff09\uff0c\u4f5c\u4e3a\u670d\u52a1\u5668\u8fd0\u884c\uff0c\u63d0\u4f9b\u5bf9\u591a\u4e2a\u6570\u636e\u5e93\u7684\u591a\u7528\u6237\u8bbf\u95ee\u3002 \u8fd9\u662f\u6307\u5bfc\uff0c\u5982\u4f55\u5728Fedora 28\/27\/26\uff0cCentOS 7.5 \/ 6.10\u548cRed Hat\uff08RHEL\uff097.5 \/ 6.10\u4e0a\u5b89\u88c5\u6216\u5347\u7ea7MySQL\u793e\u533a\u670d\u52a1\u5668\u6700\u65b0\u7248\u672c8.0\uff088.0.12\uff09\/5.7(5.7.23\uff09\u3002 \u672c\u6307\u5357\u5f53\u7136\u4e5f\u9002\u7528\u4e8eOracle Linux\u548cScientific Linux\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u6ce8\u610f\uff1a\u5982\u679c\u8981\u5347\u7ea7MySQL\uff08\u4ece\u65e9\u671f\u7248\u672c\uff09\uff0c\u8bf7\u786e\u4fdd\u5907\u4efd\uff08\u8f6c\u50a8\u548c\u590d\u5236\uff09\u6570\u636e\u5e93\u548c\u914d\u7f6e\u3002 \u8bb0\u5f97\u8fd0\u884cmysql_upgrade\u547d\u4ee4\u3002<\/p>\n

\"\"<\/p>\n

\u5b89\u88c5 MySQL YUM \u4ed3\u5e93\u6e90<\/span><\/strong><\/div>\n
## Fedora 28 ##\r\ndnf install https:\/\/dev.mysql.com\/get\/mysql80-community-release-fc28-1.noarch.rpm\r\n## Fedora 27 ##\r\ndnf install https:\/\/dev.mysql.com\/get\/mysql80-community-release-fc27-1.noarch.rpm\r\n\r\n## Fedora 26 ##\r\ndnf install https:\/\/dev.mysql.com\/get\/mysql80-community-release-fc26-1.noarch.rpm\r\n\r\nCentOS \u548c Red Hat (RHEL)\r\n## CentOS 7 and Red Hat (RHEL) 7 ##\r\nyum localinstall https:\/\/dev.mysql.com\/get\/mysql80-community-release-el7-1.noarch.rpm\r\n\r\nCentOS 6 and Red Hat (RHEL) 6 ##\r\nyum localinstall https:\/\/dev.mysql.com\/get\/mysql80-community-release-el6-1.noarch.rpm<\/pre>\n
\u5b89\u88c5\u548c\u66f4\u65b0<\/strong><\/div>\n

1.\u5b89\u88c5<\/strong><\/span><\/p>\n

Fedora 28\/27\/26\r\ndnf install mysql-community-server\r\nCentOS 7.5\/6.10 and Red Hat (RHEL) 7.5\/6.10\r\nyum install mysql-community-server<\/pre>\n
\n

2.\u5b89\u88c5 MySQL 5.7.23<\/strong><\/span><\/p>\n<\/div>\n

Fedora 28\/27\/26\r\n\r\ndnf --disablerepo=mysql80-community --enablerepo=mysql57-community install mysql-community-server\r\n\r\nCentOS 7.5\/6.10 and Red Hat (RHEL) 7.5\/6.10\r\n\r\nyum --disablerepo=mysql80-community --enablerepo=mysql57-community install mysql-community-server<\/pre>\n
3. \u5f00\u542f MySQL server \u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/strong><\/span><\/div>\n
Fedora 28\/27\/26\u00a0 CentOS 7.5\u00a0 \u00a0Red Hat (RHEL) 7.5\r\n\r\nsystemctl start mysqld.service\r\n\r\nuse restart after update\r\n\r\nsystemctl enable mysqld.service\r\n\r\nCentOS 6.10 and Red Hat (RHEL) 6.10\r\n\r\n\/etc\/init.d\/mysql start\r\n\r\nuse restart after update\r\n<\/pre>\n

OR ##<\/p>\n

service mysql start\u00a0 \u00a0## use restart after update\r\n\r\nchkconfig --levels 235 mysqld on\r\n<\/pre>\n
4. \u83b7\u53d6\u521d\u59cb\u7684\u968f\u673a\u5bc6\u7801<\/strong><\/span><\/div>\n
grep 'A temporary password is generated for root@localhost' \/var\/log\/mysqld.log |tail -1<\/pre>\n

Example Output:<\/p>\n

2018-11-20T21:11:44.229891Z 1 [Note] A temporary password is generated for root@localhost: -et)QoL4MLid<\/pre>\n

And root password is: -et)QoL4MLid<\/p>\n

5.\u91cd\u7f6e\u5bc6\u7801<\/strong><\/span><\/div>\n
alter user root@localhost identified by '\u81ea\u5b9a\u4e49\u5bc6\u7801';\r\n\u65b0\u5bc6\u7801\u5fc5\u987b\u5927\u5c0f\u5b66\u6570\u5b57\u7279\u6b8a\u7b26\u53f7\u5168\u90e8\u5177\u5907\u3002<\/pre>\n
6. \u8fde\u63a5\u672c\u5730mysql\u670d\u52a1\u5668<\/strong><\/span><\/div>\n
mysql -u root -p OR ## mysql -h localhost -u root -p<\/pre>\n

\u672c\u6587\u539f\u521b\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/fedora-mysql8.html<\/a>\u4f5c\u8005\uff1a\u502a\u5bb6\u5174\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb MySQL\u662f\u4e00\u79cd\u5173\u7cfb\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff08RDBMS\uff09\uff0c\u4f5c\u4e3a\u670d\u52a1\u5668\u8fd0\u884c\uff0c\u63d0\u4f9b\u5bf9\u591a\u4e2a\u6570\u636e\u5e93\u7684\u591a\u7528\u6237\u8bbf\u95ee\u3002 \u8fd9\u662f\u6307 […]<\/p>\n","protected":false},"author":362,"featured_media":122596,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-122555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/122555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=122555"}],"version-history":[{"count":14,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/122555\/revisions"}],"predecessor-version":[{"id":122621,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/122555\/revisions\/122621"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/122596"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=122555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=122555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=122555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}