{"id":179,"date":"2020-11-12T11:49:15","date_gmt":"2020-11-12T03:49:15","guid":{"rendered":"https:\/\/www.92k.xin\/?p=179"},"modified":"2020-11-12T12:05:41","modified_gmt":"2020-11-12T04:05:41","slug":"centos%e4%b8%8bmysql8-%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e5%88%9d%e5%a7%8b%e5%8c%96","status":"publish","type":"post","link":"https:\/\/www.92k.xin\/?p=179","title":{"rendered":"CENTOS\u4e0bMYSQL8 \u6570\u636e\u5e93\u7684\u521d\u59cb\u5316"},"content":{"rendered":"\n

\u5728CENTOS\u4e0a\u9762\u5b89\u88c5\u597dMYSQL8\u4e4b\u540e\uff0c\u6211\u4eec\u9700\u8981\u521d\u59cb\u5316MYSQL8<\/p>\n\n\n\n

${mysql_path}=\/web\/mysql\/bin \u540e\u7eed\u547d\u4ee4\u4e2d\uff0c\u8bf7\u76f4\u63a5\u66ff\u6362<\/p>\n\n\n\n

\u547d\u4ee4\u521d\u59cb\u5316<\/p>\n\n\n\n

\/web\/mysql\/bin\/mysqld  --initialize --console --basedir=\/web\/mysql --datadir=\/data\/mysql\/3306\/data\/ --user=mysql --innodb_data_file_path=ibdata1:4G:autoextend<\/pre><\/div>\n\n\n\n
\"%title\u63d2\u56fe%num\"
\u521d\u59cb\u5316\u4e4b\u540e\uff0c\u4f1a\u6709\u4e34\u65f6\u5bc6\u7801\u51fa\u73b0\uff0c\u6211\u4eec\u8bb0\u4f4f\u5b83\u3002<\/figcaption><\/figure>\n\n\n\n

\u76f8\u5173\u53c2\u6570\u89e3\u91ca\u4e00\u4e0b\uff0c <\/p>\n\n\n\n

basedir\u662fmysql\u5b89\u88c5\u8def\u5f84<\/p>\n\n\n\n

datair\u662fmysql\u6570\u636e\u5e93\u6570\u636e\u5b58\u50a8\u7684\u4f4d\u7f6e<\/p>\n\n\n\n

user\u662fmysql\u8fd0\u884c\u65f6\u5019\u7684\u7528\u6237<\/p>\n\n\n\n

innodb_data_file_path \u8fd9\u4e2a\u662f\u6307\u5b9amysql ibdata\u65f6\u5019\u7684\u6587\u4ef6\u5927\u5c0f\uff0c\u8fd9\u4e2a\u4e00\u822cblog\u4e0a\u9762\u627e\u4e0d\u5230<\/span><\/strong><\/p>\n\n\n\n

\u8fd9\u4e2a\u4e0d\u60f3mysql5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728mysql5\u4e0b\u5220\u9664ibdata\u6587\u4ef6\uff0c\u91cd\u542f\u540e\uff0c\u5b83\u4f1a\u6839\u636e\u914d\u7f6e\u91cd\u5efa\u3002<\/p>\n\n\n\n

<\/p>\n\n\n\n

mysql -uroot -hlocalhost -p{\u4e34\u65f6\u5bc6\u7801} \u8fdb\u5165\u4e4b\u540e\uff0c<\/p>\n\n\n\n

\u9700\u8981\u6211\u4eec\u5148\u53bb\u4fee\u6539\u5bc6\u7801<\/p>\n\n\n\n

ALTER USER root@localhost IDENTIFIED BY ‘{\u65b0\u5bc6\u7801\uff0c\u8bf7\u66ff\u6362}’;<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728CENTOS\u4e0a\u9762\u5b89\u88c5\u597dMYSQL8\u4e4b\u540e\uff0c\u6211\u4eec\u9700\u8981\u521d\u59cb\u5316MYSQL8 ${mysql_path}=\/web\/m… <\/p>\n