{"id":321,"date":"2013-07-31T17:30:08","date_gmt":"2013-07-31T17:30:08","guid":{"rendered":"http:\/\/caf1a3dfb505ffed0d024130f58c5cfa"},"modified":"2017-12-04T23:07:24","modified_gmt":"2017-12-04T15:07:24","slug":"mysql-%e6%9d%83%e9%99%90","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/321","title":{"rendered":"mysql user grant"},"content":{"rendered":"<ul>\n<li><strong>\u767b\u5f55MYSQL\uff1a<\/strong><\/li>\n<\/ul>\n<p>@&gt;mysql -u root -p<\/p>\n<p>@&gt;\u5bc6\u7801<\/p>\n<ul>\n<li><strong>\u7528\u6237\u6388\u6743<\/strong><\/li>\n<\/ul>\n<p>grant \u6743\u9650 on \u6570\u636e\u5e93.* to \u7528\u6237\u540d@\u767b\u5f55\u4e3b\u673a identified by \"\u5bc6\u7801\";<\/p>\n<p>mysql&gt;flush privileges;\/\/\u5237\u65b0\u7cfb\u7edf\u6743\u9650\u8868<\/p>\n<ul>\n<li><strong>\u6388\u6743\u793a\u4f8b\uff1a<\/strong><\/li>\n<\/ul>\n<p>\u6388\u6743 test \u7528\u6237 test \u8868\u6240\u6709\u6743\u9650(\u5bc6\u78011234)<\/p>\n<p>mysql&gt;grant all privileges on test.* to test@localhost identified by '1234';<\/p>\n<p>mysql&gt;flush privileges;\/\/\u5237\u65b0\u7cfb\u7edf\u6743\u9650\u8868<\/p>\n<p>&nbsp;<\/p>\n<p>\u6388\u6743 test \u7528\u6237 test \u8868\u90e8\u4efd\u6743\u9650<\/p>\n<p>mysql&gt;grant select,update on test.* to test@localhost identified by '1234';<\/p>\n<p>mysql&gt;flush privileges; \/\/\u5237\u65b0\u7cfb\u7edf\u6743\u9650\u8868<\/p>\n<p><span style=\"color: #0000ff;\">\u00a0\u00a0 grant<\/span> <span style=\"color: #0000ff;\">create<\/span> <span style=\"color: #0000ff;\">on<\/span><span style=\"color: #000000;\"> test.<\/span><span style=\"color: #808080;\">*<\/span> <span style=\"color: #0000ff;\">to<\/span><span style=\"color: #000000;\"> developer@<\/span><span style=\"color: #ff0000;\">'<\/span><span style=\"color: #ff0000;\">192.168.0.%<\/span><span style=\"color: #ff0000;\">'<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>\u67e5\u770b\u5e10\u6237\uff1a<\/strong><\/li>\n<\/ul>\n<p>use mysql;<\/p>\n<p>select user,host from user;<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>\u5220\u9664\u5e10\u6237\uff1a<\/strong><\/li>\n<\/ul>\n<p>drop user \u7528\u6237\u540d@'%';<\/p>\n<p>drop user \u7528\u6237\u540d@\u00a0localhost<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>\u521b\u5efa\u7528\u6237<\/strong><\/li>\n<\/ul>\n<p>CREATE USER 'dog'@'localhost' IDENTIFIED BY '123456';<br \/>\nCREATE USER 'pig'@'192.168.1.%' IDENTIFIED BY '123456';<br \/>\nCREATE USER 'pig'@'%';<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>\u64a4\u9500\u5df2\u7ecf\u8d4b\u4e88\u7ed9 MySQL \u7528\u6237\u6743\u9650\u7684\u6743\u9650\uff1a<\/strong><\/li>\n<\/ul>\n<p>revoke \u8ddf grant \u7684\u8bed\u6cd5\u5dee\u4e0d\u591a\uff0c\u53ea\u9700\u8981\u628a\u5173\u952e\u5b57 \u201cto\u201d \u6362\u6210 \u201cfrom\u201d \u5373\u53ef\uff1a<\/p>\n<p><span style=\"color: #0000ff;\">grant<\/span><span style=\"color: #000000;\">\u00a0 <\/span><span style=\"color: #808080;\">all<\/span> <span style=\"color: #0000ff;\">on<\/span> <span style=\"color: #808080;\">*<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #808080;\">*<\/span> <span style=\"color: #0000ff;\">to<\/span><span style=\"color: #000000;\"> <a href=\"mailto:dba@localhost\">dba<\/a><\/span><a href=\"mailto:dba@localhost\"><span style=\"color: #008000;\">@localhost<\/span><\/a><span style=\"color: #000000;\">;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">revoke<\/span> <span style=\"color: #808080;\">all<\/span> <span style=\"color: #0000ff;\">on<\/span> <span style=\"color: #808080;\">*<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #808080;\">*<\/span> <span style=\"color: #0000ff;\">from<\/span><span style=\"color: #000000;\"> dba<\/span><span style=\"color: #008000;\">@localhost<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<div class=\"cnblogs_code\">\n<p><strong>\u5bc6\u7801\u4fee\u6539<\/strong><\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">mysql&gt;\u00a0SET\u00a0PASSWORD\u00a0FOR\u00a0root@localhost\u00a0=\u00a0PASSWORD(<\/span><span class=\"string\"><span style=\"color: #0000ff;\">'yourpasswd'<\/span><\/span><span style=\"color: #000000;\">);<br \/>\n\u6216<\/span><\/span><br \/>\nmysql&gt; GRANT\u00a0USAGE\u00a0ON\u00a0*.*\u00a0TO\u00a0root@localhost\u00a0IDENTIFIED\u00a0BY\u00a0<span class=\"string\"><span style=\"color: #0000ff;\">'yourpassword'<\/span><\/span>;<br \/>\n\u6216<br \/>\nmysql&gt; ALTER USER root@localhost IDENTIFIED BY 'NE<a class=\"keylink\" href=\"https:\/\/www.2cto.com\/kf\/yidong\/wp\/\" target=\"_blank\" rel=\"noopener\">WP<\/a>ASSWORD';<br \/>\n\u6216<br \/>\nmysql&gt; ALTER USER root IDENTIFIED BY 'NE<a class=\"keylink\" href=\"https:\/\/www.2cto.com\/kf\/yidong\/wp\/\" target=\"_blank\" rel=\"noopener\">WP<\/a>ASSWORD';<\/p>\n<p><strong>\u5bc6\u7801\u8fc7\u671f<\/strong><\/p>\n<p>mysql&gt; ALTER USER root PASSWORD EXPIRE;<br \/>\nmysql&gt; ALTER USER root@localhost PASSWORD EXPIRE;<\/p>\n<p><strong>\u8d26\u6237\u9501\u5b9a<\/strong><\/p>\n<p>mysql&gt; ALTER USER root ACCOUNT LOCK;<br \/>\nmysql&gt; ALTER USER root@localhost ACCOUNT LOCK;<\/p>\n<p><strong>\u8d26\u6237\u89e3\u9501<\/strong><\/p>\n<p>mysql&gt; ALTER USER root ACCOUNT UNLOCK;<br \/>\nmysql&gt; ALTER USER root@localhost ACCOUNT UNLOCK;<\/p>\n<p><strong>\u67e5\u770b\u6743\u9650\uff1a<\/strong><\/p>\n<\/div>\n<p class=\"cnblogs_code\"><span style=\"font-family: Arial, Helvetica, simsun, u5b8bu4f53; line-height: 25px;\"><span style=\"color: #0000ff; background-color: #ffffff;\">\u67e5\u770b\u5f53\u524d\u7528\u6237\uff08\u81ea\u5df1\uff09\u6743\u9650\uff1a<\/span><\/span><\/p>\n<div class=\"left\">\n<div class=\"lcnt bdwr bds0 bdc0 \">\n<div class=\"mcnt ztag\">\n<div class=\"nbw-bitm bdwb bds2 bdc0 \">\n<div class=\"bct fc05 fc11 nbw-blog ztag js-fs2\">\n<p>show grants;<\/p>\n<p>\u67e5\u770b\u5176\u4ed6 MySQL \u7528\u6237\u6743\u9650\uff1a<\/p>\n<p>show grants for <a href=\"mailto:dba@localhost\">dba@localhost<\/a>;<\/p>\n<\/div>\n<div class=\"bct fc05 fc11 nbw-blog ztag js-fs2\">\n<div>\n<div class=\"cnblogs_code\">\n<ul>\n<li><span style=\"font-size: 13px; font-family: Simsun; line-height: normal; background-color: #ffffe0;\"><strong>revoke \u8ddf grant \u7684\u8bed\u6cd5\u5dee\u4e0d\u591a\uff0c\u53ea\u9700\u8981\u628a\u5173\u952e\u5b57 \u201cto\u201d \u6362\u6210 \u201cfrom\u201d<\/strong><\/span><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div>\n<p>\u8868 GRANT\u548cREVOKE\u7ba1\u7406\u7684\u6743\u9650<\/p>\n<div align=\"center\">\n<table border=\"1\" width=\"553\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\">\n<p align=\"center\">\u6743\u9650<\/p>\n<\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\n<p align=\"center\">\u63cf\u8ff0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">ALL PRIVILEGES<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u9664<span lang=\"EN-US\">WITH GRANT OPTION<\/span>\u4e4b\u5916\u7684\u6240\u6709\u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">ALTER<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">ALTER TABLE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">ALTER ROUTINE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u521b\u5efa\u5b58\u50a8\u4f8b\u7a0b\u7684\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">CREATE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">CREATE TABLE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">CREATE ROUTINE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u66f4\u6539\u548c\u5f03\u7528\u5b58\u50a8\u4f8b\u7a0b\u7684\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">CREATE TEMPORARY TABLES<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">CREATE TEMPORARY TABLE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">CREATE USER<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u521b\u5efa\u3001\u5f03\u7528\uff1b\u91cd\u547d\u540d\u548c\u64a4\u9500\u7528\u6237\u6743\u9650\u7684\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">CREATE VIEW<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">CREATE VIEW<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">DELETE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">DELETE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">DROP<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">DROP TABLE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">EXECUTE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u7528\u6237\u8fd0\u884c\u5b58\u50a8\u8fc7\u7a0b\u7684\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">EVENT<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u6267\u884c\u4e8b\u4ef6\u7684\u80fd\u529b\uff08\u4ece<span lang=\"EN-US\">MySQL5.1.6<\/span>\u5f00\u59cb\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">FILE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SELECT INTO OUTFILE<\/span>\u548c<span lang=\"EN-US\">LOAD DATA INFILE<\/span>\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">GRANT OPTION<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u7528\u6237\u59d4\u6d3e\u6743\u9650\u7684\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">INDEX<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">CREATE INDEX<\/span>\u548c<span lang=\"EN-US\">DROP INDEX<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">INSERT<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">INSERT<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">LOCK TABLES<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">LOCK TABLES<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">PROCESS<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SHOW PROCESSLIST<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">REFERENCES<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u672a\u6765<span lang=\"EN-US\">MySQL<\/span>\u7279\u6027\u7684\u5360\u4f4d\u7b26<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">RELOAD<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">FLUSH<\/span>\u547d\u4ee4\u96c6\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">REPLICATION CLIENT<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u7528\u6237\u67e5\u8be2\u4ece\u670d\u52a1\u5668\u548c\u4e3b\u670d\u52a1\u5668\u4f4d\u7f6e\u7684\u80fd\u529b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div align=\"center\">\n<table border=\"1\" width=\"553\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">REPLICATION SLAVE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u590d\u5236\u4ece\u670d\u52a1\u5668\u6240\u9700\u7684\u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">SELECT<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SELECT<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">SHOW DATABASES<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SHOW DATABASES<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">SHOW VIEW<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SHOW CREATE VIEW<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">SHUTDOWN<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">SHUTDOWN<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">SUPER<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u7ba1\u7406\u5458\u7ea7\u547d\u4ee4\u7684\u4f7f\u7528\uff0c\u5982<span lang=\"EN-US\">CHANGE<\/span>\u3001<span lang=\"EN-US\">MASTER<\/span>\u3001<span lang=\"EN-US\">KILL thread<\/span>\u3001<span lang=\"EN-US\">mysqladmin<\/span><span lang=\"EN-US\">\u00a0<\/span><span lang=\"EN-US\">debug<\/span>\u3001<span lang=\"EN-US\">PURGE MASTER LOGS<\/span>\u548c<span lang=\"EN-US\">SET GLOBAL<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">TRIGGER<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd\u6267\u884c\u89e6\u53d1\u5668\u7684\u80fd\u529b\uff08\u4ece<span lang=\"EN-US\">MySQL5.1.6<\/span>\u5f00\u59cb\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">UPDATE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u5f71\u54cd<span lang=\"EN-US\">UPDATE<\/span>\u547d\u4ee4\u7684\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"187\"><span lang=\"EN-US\">USAGE<\/span><\/td>\n<td style=\"font-size: 10pt; color: #000000;\" valign=\"top\" width=\"366\">\u53ea\u8fde\u63a5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<li><strong>\u767b\u5f55MYSQL\uff1a<\/strong><\/li>\n<p>\u3000\u3000@&gt;mysql -u root -p<\/p>\n<p>\u3000\u3000@&gt;\u5bc6\u7801<\/p>\n<p>&nbsp;<\/p>\n<li><strong>\u7528\u6237\u6388\u6743<\/strong><\/li>\n<p>\u3000\u3000 grant \u6743\u9650 on \u6570\u636e\u5e93.* to \u7528\u6237\u540d@\u767b\u5f55\u4e3b\u673a identified by \"\u5bc6\u7801\";\u3000<\/p>\n<p>&nbsp;\u3000\u3000mysql&gt;flush privileges;\/\/\u5237\u65b0\u7cfb\u7edf\u6743\u9650\u8868<\/p>\n<p>&nbsp;<\/p>\n<li><strong>\u6388\u6743\u793a\u4f8b\uff1a<\/strong><\/li>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u6388\u6743 test \u7528\u6237 test \u8868\u6240\u6709\u6743\u9650(\u5bc6\u78011234)<\/p>\n<p>\u3000\u3000 mysql&gt;grant all privileges on test.* to test@localhost ide...<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/321\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[288],"tags":[2],"class_list":["post-321","post","type-post","status-publish","format-standard","hentry","category-db","tag-MySQL"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=321"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/321\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}