{"id":12300,"date":"2025-04-18T19:26:59","date_gmt":"2025-04-18T11:26:59","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/12300.html"},"modified":"2025-04-18T19:26:59","modified_gmt":"2025-04-18T11:26:59","slug":"%e9%ba%92%e9%ba%9fv10-linux%e9%ab%98%e7%ba%a7%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85mysql8-3-0%ef%bc%88%e5%9b%be%e6%96%87%e7%bb%93%e5%90%88%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/12300.html","title":{"rendered":"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09"},"content":{"rendered":"<h2>\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0<\/h2>\n<p>\u6ce8\u610f&#xff1a;\u8fd9\u91cc\u6211\u7684Linux&#xff0c;MYSQL\u6240\u6709\u64cd\u4f5c\u5747\u4f7f\u7528\u7684\u662f root \u8d26\u53f7 <\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0<\/li>\n<li>\u4e00\u3001\u5b89\u88c5\u51c6\u5907<\/li>\n<li>\n<ul>\n<li>1\u3001\u4e0b\u8f7dMYSQL<\/li>\n<li>3\u3001\u67e5\u770b\u539f\u6765\u662f\u5426\u5df2\u7ecf\u5b58\u5728Mysql<\/li>\n<li>2\u3001\u4e0a\u4f20\/\u89e3\u538bMySQL<\/li>\n<li>3\u3001\u521d\u59cb\u5316Mysql<\/li>\n<li>4\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/li>\n<li>5\u3001\u542f\u52a8Mysql&#xff0c;\u914d\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f<\/li>\n<li>6\u3001\u914d\u7f6eroot\u5bc6\u7801\u4e0e\u8fdc\u7a0b\u767b\u9646<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u4e00\u3001\u5b89\u88c5\u51c6\u5907<\/h2>\n<p>\u786e\u8ba4\u8981\u4e0b\u8f7d\u7684Mysql\u7248\u672c\u4e0e\u9002\u914d\u7684Linux\u67b6\u6784 \u8fdb\u5165linux \u67e5\u770b\u7cfb\u7edf\u67b6\u6784&#xff0c;\u6839\u636e\u7cfb\u7edf\u67b6\u6784\u9009\u62e9\u4e0b\u8f7d\u7684Mysql\u7248\u672c \u4f7f\u7528 uname -m \u547d\u4ee4\u67e5\u770b\u7cfb\u7edf\u67b6\u6784<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;root database<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># uname -m<\/span><br \/>\nx86_64<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112656-6802370075f55.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u662f x86_64 \u67b6\u6784&#xff08;Intel\/AMD 64 \u4f4d&#xff09; \u5c31\u4e0b\u8f7d Linux &#8211; Generic (glibc 2.28) (x86, 64-bit) \u7cfb\u5217 \u5982\u679c\u662f aarch64 \u67b6\u6784&#xff08;ARM 64 \u4f4d&#xff09;\u7f16\u8bd1\u7684 \u5c31\u8981\u4e0b\u8f7d Linux &#8211; Generic (glibc 2.28) (ARM, 64-bit) \u7cfb\u5217 \u4e0d\u7136\u7684\u8bdd\u4f1a \u67b6\u6784\u4e0d\u5339\u914d \u5bfc\u81f4\u5b89\u88c5\u5931\u8d25&#xff0c;\u6216\u8005\u65e0\u6cd5\u6267\u884c\u4e8c\u8fdb\u5236\u6587\u4ef6: \u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f\u9519\u8bef<\/p>\n<p>\u5b98\u7f51\u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/dev.mysql.com\/downloads\/mysql\/<\/p>\n<h3>1\u3001\u4e0b\u8f7dMYSQL<\/h3>\n<p>\u8fd9\u91cc\u6211\u662f\u8981\u4e0b\u8f7d\u5386\u53f2\u7248\u672c&#xff0c;\u6240\u4ee5\u70b9 Archives <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112656-68023700833c4.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/> \u9009\u62e9MySQL\u7248\u672c\u3001\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b\u3001\u64cd\u4f5c\u7cfb\u7edf\u7684\u67b6\u6784\u7c7b\u578b&#xff0c;\u6211\u7684\u662f x86_64 \u6240\u4ee5\u4e0b\u8f7d mysql-8.3.0-linux-glibc2.28-x86_64.tar.xz <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112657-68023701284eb.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>3\u3001\u67e5\u770b\u539f\u6765\u662f\u5426\u5df2\u7ecf\u5b58\u5728Mysql<\/h3>\n<p><span class=\"token punctuation\">[<\/span>root&#064;root ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># rpm -qa | grep mysql<\/span><br \/>\npython2-mysqlclient-1.3.12-8.ky10.x86_64<br \/>\npcp-pmda-mysql-4.1.3-15.p01.ky10.x86_64<br \/>\nqt5-qtbase-mysql-5.11.1-20.p01.ky10.x86_64<br \/>\n\u8fdb\u884c\u5378\u8f7d<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#  rpm -e  &#8211;nodeps python2-mysqlclient <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#  rpm -e  &#8211;nodeps pcp-pmda-mysql<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\">#  rpm -e  &#8211;nodeps qt5-qtbase-mysql<\/span><br \/>\n<span class=\"token comment\"># \u518d\u6b21\u67e5\u770b&#xff0c;\u5df2\u7ecf\u6ca1\u6709\u4e86<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root ~<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># rpm -qa | grep mysql<\/span><\/p>\n<p>\u5378\u8f7d\u540e\u53ef\u80fd\u5b58\u5728\u6b8b\u7559\u7684MySQL\u7ec4&#xff0c;\u53ef\u4ee5\u7ee7\u7eed\u4f7f\u7528&#xff0c; \u4e5f\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5220\u9664&#xff1a;<\/p>\n<p>\u5220\u9664 mysql \u7528\u6237&#xff1a;<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">userdel<\/span> mysql<br \/>\n\u5220\u9664 mysql \u7ec4&#xff1a;<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">groupdel<\/span> mysql<br \/>\n\u5220\u9664 MySQL \u6570\u636e\u76ee\u5f55&#xff08;\u5982\u679c\u5b58\u5728&#xff09;&#xff1a;<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-rf<\/span> \/var\/lib\/mysql<br \/>\n\u5220\u9664 MySQL \u914d\u7f6e\u6587\u4ef6&#xff08;\u5982\u679c\u5b58\u5728&#xff09;<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-rf<\/span> \/etc\/my.cnf \/etc\/mysql\/<\/p>\n<p>\u521b\u5efa\u7528\u6237\u4e0e\u7ec4 groupadd mysql useradd -r -g mysql -s \/bin\/false mysql \u5982\u679c\u5df2\u7ecf\u5b58\u5728\u7ec4&#xff0c; mysql \u7528\u6237\u4e0d\u5b58\u5728&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u521b\u5efa mysql \u7528\u6237&#xff0c;\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u73b0\u6709\u7684 mysql \u7ec4\u4e2d&#xff1a;sudo useradd -r -g mysql -s \/bin\/false mysql<\/p>\n<h3>2\u3001\u4e0a\u4f20\/\u89e3\u538bMySQL<\/h3>\n<p>\u4f7f\u7528\u8fde\u63a5\u5de5\u5177\u5c06\u538b\u7f29\u5305\u4e0a\u4f20\u81f3 Linux \u7684 \/root\/waves\/database\/ \u6587\u4ef6\u5939\u4e0b\u3002 &#xff08;\u4e0a\u4f20\u8def\u5f84\u770b\u4e2a\u4eba\u7231\u597d\u9009\u62e9&#xff09;\u3002<\/p>\n<p>\u8fdb\u5165 \/root\/waves\/database\/ \u4f7f\u7528\u547d\u4ee4\u8fdb\u884c\u89e3\u538b,\u5c06\u89e3\u538b\u540e\u7684\u8d44\u6e90\u653e\u5230 \/usr\/local\/waves\/database\/mysql830 \u6587\u4ef6\u5939\u4e0b<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;root database<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># tar -xf mysql-8.3.0-linux-glibc2.28-x86_64.tar.xz -C \/usr\/local\/waves\/database\/mysql830<\/span><\/p>\n<p>\u5728 \/usr\/local\/waves\/database\/mysql830 \u521b\u5efa data \u76ee\u5f55\u5e76\u8d4b\u4e88\u6743\u9650&#xff0c;\u8d4b\u4e88mysql830 \u6743\u9650<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;root mysql830<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sudo mkdir data<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root mysql830<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># chown mysql:mysql -R \/usr\/local\/waves\/database\/mysql830\/data\/<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root mysql830<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># chown mysql:mysql -R \/usr\/local\/waves\/database\/mysql830\/<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112657-68023701c332a.png\" alt=\"\u547d\u4ee4\u622a\u56fe\" \/><\/p>\n<h3>3\u3001\u521d\u59cb\u5316Mysql<\/h3>\n<p>\u8fd9\u4e2a\u65f6\u5019 root \u5bc6\u7801\u662f\u4e3a\u7a7a\u7684&#xff0c;\u540e\u8fb9\u4f1a\u8fdb\u884c\u8bbe\u7f6e\u5bc6\u7801\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>root&#064;root mysql-8.3.0-linux-glibc2.28-x86_64<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># .\/bin\/mysqld &#8211;user&#061;mysql &#8211;basedir&#061;\/usr\/local\/waves\/database\/mysql830 &#8211;datadir&#061;\/usr\/local\/waves\/database\/mysql830\/data &#8211;initialize-insecure &#8211;user&#061;mysql<\/span><\/p>\n<p>\u521b\u5efa my.cnf \u914d\u7f6e\u6587\u4ef6&#xff0c;\u8fdb\u884c\u7f16\u8f91&#xff0c;\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9&#xff1a; lower_case_table_names \u914d\u7f6eMysql\u5bf9\u5927\u5c0f\u5199\u662f\u5426\u654f\u611f\u3002 \u9700\u8981\u6ce8\u610f\u7684\u662f lower_case_table_names\u4e00\u7ecf\u914d\u7f6e\u662f\u4e0d\u53ef\u88ab\u66f4\u6539\u7684&#xff0c;\u8981\u60f3\u66f4\u6539\u503c&#xff0c;\u5fc5\u987b\u91cd\u65b0\u521d\u59cb\u5316Mysql\u624d\u884c\u3002 \u5b98\u65b9\u6587\u6863\u8bf4\u8fd9\u4e2a\u53c2\u6570\u53ea\u80fd\u5728\u6570\u636e\u5e93\u521d\u59cb\u5316\u64cd\u4f5c\u4e4b\u524d\u6dfb\u3002  \u5982\u679c\u6570\u636e\u5e93\u5df2\u7ecf\u88ab\u521d\u59cb\u5316\u8fc7&#xff0c;\u9700\u8981\u5148\u5220\u9664\u6570\u636e\u76ee\u5f55\u5e76\u91cd\u65b0\u521d\u59cb\u5316\u3002\u4e0d\u91cd\u65b0\u521d\u59cb\u5316MySQL\u76f4\u63a5\u66f4\u6539my.cnf\u914d\u7f6e\u7684\u8bdd&#xff0c;\u91cd\u542fMySQL\u4f1a\u5bfc\u81f4\u542f\u52a8\u62a5\u9519&#xff0c;\u540c\u65f6\u6570\u636e\u5e93\u4e0d\u53ef\u88ab\u8fde\u63a5\u3002<\/p>\n<p>\u914d\u7f6e\u9879\u6839\u636e\u9700\u8981\u8fdb\u884c\u914d\u7f6e&#xff0c;\u5171\u6709\u4e09\u79cd \u503c \u53ef\u914d\u7f6e 0 \u4e3a linux \u4e0b\u7684\u9ed8\u8ba4\u914d\u7f6e&#xff0c;\u8868\u540d\u533a\u5206\u5927\u5c0f\u5199&#xff0c;\u56e0\u4e3aLinux\u5bf9\u5927\u5c0f\u5199\u654f\u611f\u3002 1 \u4e3a windows \u4e0b\u7684\u9ed8\u8ba4\u89c4\u5219&#xff0c;\u8868\u540d\u5b58\u50a8\u5728\u78c1\u76d8\u4e0a\u9762\u662f\u5c0f\u5199\u7684&#xff0c;\u4f46\u662f\u6bd4\u8f83\u7684\u65f6\u5019\u662f\u4e0d\u8fdb\u884c\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002 2 \u4e3a macos \u4e0b\u7684\u9ed8\u8ba4\u89c4\u5219&#xff0c;\u8868\u540d\u5b58\u50a8\u4e3a\u5efa\u8868\u65f6\u7684\u5927\u5c0f\u5199&#xff0c;\u4f46\u662f\u6bd4\u8f83\u7684\u65f6\u5019\u662f\u4f7f\u7528\u5c0f\u5199\u8fdb\u884c\u6bd4\u8f83\u7684<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">vim<\/span> \/etc\/my.cnf<\/p>\n<p><span class=\"token comment\">#\u586b\u5165: <\/span><br \/>\n<span class=\"token punctuation\">[<\/span>mysqld<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6e3306\u7aef\u53e3<\/span><br \/>\n<span class=\"token assign-left variable\">port<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3306<\/span><br \/>\n<span class=\"token comment\">#bind-address &#061; 0.0.0.0 \u8868\u793a MySQL \u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3\u3002 \u914d\u7f6e\u8fdc\u7a0b\u8fde\u63a5\u4f1a\u7528\u5230<\/span><br \/>\nbind-address <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0.0<\/span>.0.0<br \/>\n<span class=\"token comment\"># \u4e3a1\u65f6\u8bbe\u7f6eMysql\u4e0d\u533a\u5206\u5927\u5c0f\u5199&#xff0c;\u9ed8\u8ba4\u533a\u5206\u5927\u5c0f\u5199  <\/span><br \/>\n<span class=\"token assign-left variable\">lower_case_table_names<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6emysql\u7684\u5b89\u88c5\u76ee\u5f55<\/span><br \/>\n<span class=\"token assign-left variable\">basedir<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64<br \/>\n<span class=\"token comment\"># \u8bbe\u7f6emysql\u6570\u636e\u5e93\u7684\u6570\u636e\u7684\u5b58\u653e\u76ee\u5f55<\/span><br \/>\n<span class=\"token assign-left variable\">datadir<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/data<br \/>\n<span class=\"token assign-left variable\">socket<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64\/mysql.sock<br \/>\n<span class=\"token comment\"># \u5141\u8bb8\u6700\u5927\u8fde\u63a5\u6570<\/span><br \/>\n<span class=\"token assign-left variable\">max_connections<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">200<\/span><br \/>\n<span class=\"token comment\"># \u5141\u8bb8\u8fde\u63a5\u5931\u8d25\u7684\u6b21\u6570\u3002<\/span><br \/>\n<span class=\"token assign-left variable\">max_connect_errors<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span><br \/>\n<span class=\"token comment\"># \u670d\u52a1\u7aef\u4f7f\u7528\u7684\u5b57\u7b26\u96c6\u9ed8\u8ba4\u4e3autf8mb4<\/span><br \/>\ncharacter-set-server<span class=\"token operator\">&#061;<\/span>utf8mb4<br \/>\n<span class=\"token comment\"># \u521b\u5efa\u65b0\u8868\u65f6\u5c06\u4f7f\u7528\u7684\u9ed8\u8ba4\u5b58\u50a8\u5f15\u64ce<\/span><br \/>\ndefault-storage-engine<span class=\"token operator\">&#061;<\/span>INNODB<br \/>\n<span class=\"token comment\"># \u9ed8\u8ba4\u4f7f\u7528\u201cmysql_native_password\u201d\u63d2\u4ef6\u8ba4\u8bc1<\/span><br \/>\n<span class=\"token comment\">#mysql_native_password<\/span><br \/>\n<span class=\"token assign-left variable\">default_authentication_plugin<\/span><span class=\"token operator\">&#061;<\/span>mysql_native_password<br \/>\n<span class=\"token punctuation\">[<\/span>mysql<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6<\/span><br \/>\ndefault-character-set<span class=\"token operator\">&#061;<\/span>utf8mb4<br \/>\n<span class=\"token punctuation\">[<\/span>client<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u8fde\u63a5\u670d\u52a1\u7aef\u65f6\u9ed8\u8ba4\u4f7f\u7528\u7684\u7aef\u53e3<\/span><br \/>\n<span class=\"token assign-left variable\">port<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">3306<\/span><br \/>\n<span class=\"token assign-left variable\">socket<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64\/mysql.sock<br \/>\ndefault-character-set<span class=\"token operator\">&#061;<\/span>utf8mb4<\/p>\n<h3>4\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<p><span class=\"token function\">vim<\/span> \/etc\/profile<br \/>\n<span class=\"token comment\"># \u5728\u6587\u4ef6\u672b\u5c3e\u8fdb\u884c\u8ffd\u52a0 mysql \u7684\u5b89\u88c5\u76ee\u5f55<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">PATH<\/span><\/span><span class=\"token operator\">&#061;<\/span><span class=\"token environment constant\">$PATH<\/span>:\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64\/bin<br \/>\n<span class=\"token comment\"># \u5237\u65b0\u6743\u9650&#xff0c;\u4f7fMysql\u914d\u7f6e\u751f\u6548<\/span><br \/>\n<span class=\"token builtin class-name\">source<\/span> \/etc\/profile<\/p>\n<h3>5\u3001\u542f\u52a8Mysql&#xff0c;\u914d\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f<\/h3>\n<p>\u5728 \/etc\/systemd\/system\/ \u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u670d\u52a1\u6587\u4ef6 mysqld.service<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">vi<\/span> \/etc\/systemd\/system\/mysqld.service<\/p>\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9&#xff08;\u6839\u636e\u4f60\u7684 MySQL \u5b89\u88c5\u8def\u5f84\u8c03\u6574 ExecStart\u7684\u8def\u5f84\u5c31\u662f&#xff1a;Mysql\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684bin\u76ee\u5f55\u4e2d\u627e\u5230mysqld \u6240\u5904\u8def\u5f84\u52a0\u4e0a \/mysqld basedir &#xff1a;Mysql\u5b89\u88c5\u76ee\u5f55 datadir &#xff1a; data\u7684\u76ee\u5f55 &#xff09;&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>Unit<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">Description<\/span><span class=\"token operator\">&#061;<\/span>MySQL Server<br \/>\n<span class=\"token assign-left variable\">After<\/span><span class=\"token operator\">&#061;<\/span>network.target<\/p>\n<p><span class=\"token punctuation\">[<\/span>Service<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">User<\/span><span class=\"token operator\">&#061;<\/span>mysql<br \/>\n<span class=\"token assign-left variable\">Group<\/span><span class=\"token operator\">&#061;<\/span>mysql<br \/>\n<span class=\"token assign-left variable\">ExecStart<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64\/bin\/mysqld <span class=\"token parameter variable\">&#8211;basedir<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/mysql-8.3.0-linux-glibc2.28-x86_64 <span class=\"token parameter variable\">&#8211;datadir<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/waves\/database\/mysql830\/data<br \/>\n<span class=\"token assign-left variable\">Restart<\/span><span class=\"token operator\">&#061;<\/span>on-failure<\/p>\n<p><span class=\"token punctuation\">[<\/span>Install<span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token assign-left variable\">WantedBy<\/span><span class=\"token operator\">&#061;<\/span>multi-user.target<\/p>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa&#xff1a; \u6309Esc\u952e&#xff0c;\u7136\u540e\u8f93\u5165**:wq**\u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<p>\u91cd\u65b0\u52a0\u8f7d systemd \u914d\u7f6e\u548c\u542f\u52a8 MySQL \u670d\u52a1\u3001\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8\u3001\u68c0\u67e5\u670d\u52a1\u72b6\u6001<\/p>\n<p><span class=\"token comment\"># \u91cd\u8f7dsystemd \u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl daemon-reload<br \/>\n<span class=\"token comment\"># \u542f\u52a8 MySQL \u670d\u52a1<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl start mysqld<br \/>\n<span class=\"token comment\"># \u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> mysqld<br \/>\n<span class=\"token comment\"># \u68c0\u67e5\u670d\u52a1\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl status mysqld<br \/>\n<span class=\"token comment\"># \u91cd\u542f MySQL \u670d\u52a1<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl restart mysqld<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112657-68023701e3669.png\" alt=\"\u52a0\u7c97\u6837\u5f0f\" \/><\/p>\n<h3>6\u3001\u914d\u7f6eroot\u5bc6\u7801\u4e0e\u8fdc\u7a0b\u767b\u9646<\/h3>\n<p>1\u3001\u4f7f\u7528 mysql -uroot -p \u56de\u8f66&#xff0c;\u5bc6\u7801\u6846&#xff08;\u8fd9\u4e2a\u65f6\u5019\u5bc6\u7801\u8fd8\u662f\u7a7a\u7684&#xff0c;\u76f4\u63a5\u56de\u8f66\u5373\u53ef\u8fdb\u5165Mysql&#xff09;\u3002\u8bbe\u7f6eroot\u8d26\u6237\u5bc6\u7801 2\u3001\u67e5\u8be2root \u7528\u6237\u7684\u4e3b\u673a\u90e8\u5206&#xff0c;\u5982\u679c\u662flocalhost \u9700\u8981\u6539\u4e3a % &#xff0c;\u8868\u793a\u5141\u8bb8\u4ece\u4efb\u4f55\u4e3b\u673a\u767b\u5f55\u3002 3\u3001\u9632\u706b\u5899\u653e\u884c 3306\u7aef\u53e3&#xff0c;\u5237\u65b0\u9632\u706b\u5899\u7b56\u7565&#xff0c;\u68c0\u67e5\u662f\u5426\u6210\u529f\u653e\u884c 4\u3001#\u67e5\u770b root&#064;% \u7528\u6237\u5177\u6709\u8fdc\u7a0b\u767b\u5f55\u7684\u6743\u9650\u3002\u5982\u679c\u6ca1\u6709 GRANT ALL PRIVILEGES&#xff0c;\u9700\u8981\u6388\u4e88\u6743\u9650&#xff1a;<\/p>\n<p><span class=\"token number\">1<\/span>\u3001\u8bbe\u7f6eroot\u8d26\u6237\u5bc6\u7801&#xff0c;\u8fdb\u884c\u5237\u65b0\u3002<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root etc<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># mysql -uroot -p<\/span><br \/>\nEnter password:<br \/>\nWelcome to the MariaDB monitor.  Commands end with <span class=\"token punctuation\">;<\/span> or <span class=\"token punctuation\">\\\\<\/span>g.<br \/>\nYour MySQL connection <span class=\"token function\">id<\/span> is <span class=\"token number\">8<\/span><br \/>\nServer version: <span class=\"token number\">8.3<\/span>.0 MySQL Community Server &#8211; GPL<br \/>\nCopyright <span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span> <span class=\"token number\">2000<\/span>, <span class=\"token number\">2018<\/span>, Oracle, MariaDB Corporation Ab and others.<br \/>\nType <span class=\"token string\">&#039;help;&#039;<\/span> or <span class=\"token string\">&#039;\\\\h&#039;<\/span> <span class=\"token keyword\">for<\/span> help. Type <span class=\"token string\">&#039;\\\\c&#039;<\/span> to <span class=\"token function\">clear<\/span> the current input statement.<\/p>\n<p><span class=\"token comment\"># \u5982\u679c\u8fd9\u91cc\u62a5\u9519&#xff0c;\u662f\u56e0\u4e3a root \u9ed8\u8ba4\u8fde\u63a5\u4e3b\u673a\u662f localhost &#xff0c;\u800c\u6211\u662f\u6240\u6709\u4e3b\u673a\u90fd\u53ef\u8fde\u63a5&#xff0c;\u4e0d\u9700\u8981\u6240\u6709\u4e3b\u673a\u8fde\u63a5\u6539\u4e3alocalhost\u5373\u53ef&#xff0c;\u9700\u8981\u7684\u8bdd\u8981\u5148\u8fdb\u884c\u7b2c\u4e8c\u6b65\u3002<\/span><br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> ALTER <span class=\"token environment constant\">USER<\/span> <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span> IDENTIFIED BY <span class=\"token string\">&#039;password&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\nERROR <span class=\"token number\">1396<\/span> <span class=\"token punctuation\">(<\/span>HY000<span class=\"token punctuation\">)<\/span>: Operation ALTER <span class=\"token environment constant\">USER<\/span> failed <span class=\"token keyword\">for<\/span> <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span><\/p>\n<p>MySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> ALTER <span class=\"token environment constant\">USER<\/span> <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span> IDENTIFIED BY <span class=\"token string\">&#039;password&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQuery OK, <span class=\"token number\">0<\/span> rows affected <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.007<\/span> sec<span class=\"token punctuation\">)<\/span><\/p>\n<p>MySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> FLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><br \/>\nQuery OK, <span class=\"token number\">0<\/span> rows affected <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.002<\/span> sec<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token number\">2<\/span>\u3001\u67e5\u8be2root \u7528\u6237\u7684\u4e3b\u673a\u90e8\u5206&#xff0c;\u5982\u679c\u662flocalhost \u9700\u8981\u6539\u4e3a  % &#xff0c;\u8868\u793a\u5141\u8bb8\u4ece\u4efb\u4f55\u4e3b\u673a\u767b\u5f55\u3002<br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> SELECT user, <span class=\"token function\">host<\/span> FROM mysql.user<span class=\"token punctuation\">;<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token operator\">|<\/span> user             <span class=\"token operator\">|<\/span> <span class=\"token function\">host<\/span>      <span class=\"token operator\">|<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token operator\">|<\/span> mysql.infoschema <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> mysql.session    <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> mysql.sys        <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> root             <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token comment\"># \u66f4\u65b0 mysql.user \u8868 &#xff0c;\u8fd0\u884c\u4ee5\u4e0b SQL \u8bed\u53e5&#xff0c;\u5c06 root \u7528\u6237\u7684\u4e3b\u673a\u90e8\u5206\u6539\u4e3a %&#xff1a;<\/span><br \/>\nUPDATE mysql.user SET <span class=\"token assign-left variable\">host<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;%&#039;<\/span> WHERE <span class=\"token assign-left variable\">user<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;root&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\"># \u4fee\u6539\u540e&#xff0c;\u5237\u65b0\u6743\u9650\u4f7f\u5176\u751f\u6548&#xff1a;<\/span><br \/>\nFLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\"># \u518d\u6b21\u67e5\u8be2 mysql.user \u8868&#xff0c;\u786e\u8ba4\u4fee\u6539\u662f\u5426\u751f\u6548<\/span><br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> FLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><br \/>\nQuery OK, <span class=\"token number\">0<\/span> rows affected <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.006<\/span> sec<span class=\"token punctuation\">)<\/span><\/p>\n<p>MySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> SELECT user, <span class=\"token function\">host<\/span> FROM mysql.user<span class=\"token punctuation\">;<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token operator\">|<\/span> user             <span class=\"token operator\">|<\/span> <span class=\"token function\">host<\/span>      <span class=\"token operator\">|<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token operator\">|<\/span> root             <span class=\"token operator\">|<\/span> %         <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> mysql.infoschema <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> mysql.session    <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n<span class=\"token operator\">|<\/span> mysql.sys        <span class=\"token operator\">|<\/span> localhost <span class=\"token operator\">|<\/span><br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n<span class=\"token number\">4<\/span> rows <span class=\"token keyword\">in<\/span> <span class=\"token builtin class-name\">set<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.001<\/span> sec<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\">#3\u3001\u9632\u706b\u5899\u653e\u884c 3306\u7aef\u53e3&#xff0c;\u5237\u65b0\u9632\u706b\u5899\u7b56\u7565&#xff0c;\u68c0\u67e5\u662f\u5426\u6210\u529f\u653e\u884c<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root etc<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sudo firewall-cmd &#8211;zone&#061;public &#8211;add-port&#061;3306\/tcp &#8211;permanent<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root etc<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sudo firewall-cmd &#8211;reload<\/span><br \/>\nsuccess<br \/>\n<span class=\"token punctuation\">[<\/span>root&#064;root etc<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># sudo netstat -tuln | grep 3306<\/span><br \/>\ntcp        <span class=\"token number\">0<\/span>      <span class=\"token number\">0<\/span> <span class=\"token number\">0.0<\/span>.0.0:3306            <span class=\"token number\">0.0<\/span>.0.0:*               LISTEN<br \/>\ntcp6       <span class=\"token number\">0<\/span>      <span class=\"token number\">0<\/span> :::33060                :::*                    LISTEN<\/p>\n<p><span class=\"token comment\">#4\u3001\u67e5\u770b root&#064;% \u7528\u6237\u5177\u6709\u8fdc\u7a0b\u767b\u5f55\u7684\u6743\u9650\u3002\u5982\u679c\u6ca1\u6709 GRANT ALL PRIVILEGES&#xff0c;\u9700\u8981\u6388\u4e88\u6743\u9650&#xff1a;<\/span><br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> SHOW GRANTS FOR <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n&#043;&#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;&#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;&#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;&#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;&#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;&#043;<br \/>\n<span class=\"token operator\">|<\/span> Grants <span class=\"token keyword\">for<\/span> root&#064;%                                                                                                                                                                                                                                                                                                                                                                                <span class=\"token operator\">|<\/span><br \/>\n&#043;&#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;&#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;&#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;&#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;&#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;&#043;<br \/>\n<span class=\"token operator\">|<\/span> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE <span class=\"token environment constant\">USER<\/span>, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO <span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>root<span class=\"token variable\">&#096;<\/span><\/span>&#064;<span class=\"token variable\"><span class=\"token variable\">&#096;<\/span>%<span class=\"token variable\">&#096;<\/span><\/span> WITH GRANT OPTION <span class=\"token operator\">|<\/span><br \/>\n&#043;&#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;&#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;&#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;&#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;&#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;&#043;<br \/>\n<span class=\"token number\">1<\/span> row <span class=\"token keyword\">in<\/span> <span class=\"token builtin class-name\">set<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.006<\/span> sec<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u8fdb\u884c\u6388\u6743<\/span><br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> GRANT ALL PRIVILEGES ON *.* TO <span class=\"token string\">&#039;root&#039;<\/span>&#064;<span class=\"token string\">&#039;%&#039;<\/span> WITH GRANT OPTION<span class=\"token punctuation\">;<\/span><br \/>\nQuery OK, <span class=\"token number\">0<\/span> rows affected <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.020<\/span> sec<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u5237\u65b0\u6743\u9650<\/span><br \/>\nMySQL <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>none<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token operator\">&gt;<\/span> FLUSH PRIVILEGES<span class=\"token punctuation\">;<\/span><br \/>\nQuery OK, <span class=\"token number\">0<\/span> rows affected <span class=\"token punctuation\">(<\/span><span class=\"token number\">0.007<\/span> sec<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5230\u8fd9\u91cc\u5c31\u914d\u7f6e\u5b8c\u6210\u5566&#xff01; \u6253\u5f00Navicat\u8fdb\u884c\u8fde\u63a5\u6d4b\u8bd5\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112658-6802370213849.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u9e92\u9e9fV10Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql-8.3.0\uff0c\u5e76\u4e14\u914d\u7f6e\u8fdc\u7a0b\u767b\u9646_\u9e92\u9e9flinux\u90e8\u7f72mysql<\/p>\n","protected":false},"author":2,"featured_media":12294,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[116,58,43],"topic":[],"class_list":["post-12300","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-adb","tag-linux","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/12300.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u9e92\u9e9fV10Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql-8.3.0\uff0c\u5e76\u4e14\u914d\u7f6e\u8fdc\u7a0b\u767b\u9646_\u9e92\u9e9flinux\u90e8\u7f72mysql\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/12300.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T11:26:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112656-6802370075f55.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12300.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/12300.html\",\"name\":\"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T11:26:59+00:00\",\"dateModified\":\"2025-04-18T11:26:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/12300.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/12300.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/12300.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/12300.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u9e92\u9e9fV10Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql-8.3.0\uff0c\u5e76\u4e14\u914d\u7f6e\u8fdc\u7a0b\u767b\u9646_\u9e92\u9e9flinux\u90e8\u7f72mysql","og_url":"https:\/\/www.wsisp.com\/helps\/12300.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T11:26:59+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418112656-6802370075f55.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/12300.html","url":"https:\/\/www.wsisp.com\/helps\/12300.html","name":"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T11:26:59+00:00","dateModified":"2025-04-18T11:26:59+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/12300.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/12300.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/12300.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9e92\u9e9fV10 Linux\u9ad8\u7ea7\u670d\u52a1\u5668\u5b89\u88c5Mysql8.3.0\uff08\u56fe\u6587\u7ed3\u5408\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=12300"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/12300\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/12294"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=12300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=12300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=12300"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=12300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}