{"id":4566,"date":"2019-08-24T00:48:49","date_gmt":"2019-08-23T16:48:49","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4566"},"modified":"2019-08-24T00:48:51","modified_gmt":"2019-08-23T16:48:51","slug":"mysqladmin","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/mysqladmin","title":{"rendered":"mysqladmin\u547d\u4ee4 – MySQL\u670d\u52a1\u5668\u5ba2\u6237\u7aef\u7ba1\u7406\u5de5\u5177"},"content":{"rendered":"\n

mysqladmin\u547d\u4ee4\u662fMySQL\u670d\u52a1\u5668\u7ba1\u7406\u4efb\u52a1\u7684\u5ba2\u6237\u7aef\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u68c0\u67e5MySQL\u670d\u52a1\u5668\u7684\u914d\u7f6e\u548c\u5f53\u524d\u5de5\u4f5c\u72b6\u6001\uff0c\u521b\u5efa\u548c\u5220\u9664\u6570\u636e\u5e93\uff0c\u521b\u5efa\u7528\u6237\u548c\u4fee\u6539\u7528\u6237\u5bc6\u7801\u7b49\u64cd\u4f5c\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f : <\/strong>mysqladmin [\u53c2\u6570] [\u7ba1\u7406\u547d\u4ee4]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-h<\/td>MySQL\u670d\u52a1\u5668\u4e3b\u673a\u540d\u6216ip\u5730\u5740<\/td><\/tr>
-u<\/td>\u8fde\u63a5MySQL\u670d\u52a1\u5668\u7684\u7528\u6237\u540d<\/td><\/tr>
-p<\/td>\u8fde\u63a5MySQL\u670d\u52a1\u5668\u7684\u5bc6\u7801<\/td><\/tr>
-- -help<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr><\/tbody><\/table>\n\n\n\n

mysqladmin\u547d\u4ee4\u652f\u6301\u7684MySQL\u670d\u52a1\u5668\u7ba1\u7406\u547d\u4ee4\u975e\u5e38\u4e30\u5bcc\uff0c\u53ef\u4ee5\u901a\u8fc7\u201c- -help\u201d\u663e\u793a\u53ef\u7528\u7684\u7ba1\u7406\u547d\u4ee4\u3002<\/p>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u770b\u670d\u52a1\u5668\u5f53\u524d\u72b6\u6001\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mysqladmin  -u root -p status\nEnter password: \nUptime: 26  Threads: 1  Questions: 2  Slow queries: 0  Opens: 67  Flush tables: 1  Open tables: 60  Queries per second avg: 0.076 <\/pre>\n\n\n\n

\u4fee\u6539root\u5bc6\u7801\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mysqladmin -u root -poldpassword password 'linuxcool'<\/pre>\n\n\n\n

\u68c0\u67e5mysqlserver\u662f\u5426\u53ef\u7528\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mysqladmin -u root -p ping\nmysqld is alive <\/pre>\n\n\n\n

\u521b\u5efa\u65b0\u6570\u636e\u5e93\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mysqladmin -u root -p create mysql_linuxcool<\/pre>\n","protected":false},"excerpt":{"rendered":"

mysqladmin\u547d\u4ee4\u662fMySQL\u670d\u52a1\u5668\u7ba1\u7406\u4efb\u52a1\u7684\u5ba2\u6237\u7aef\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u68c0\u67e5MySQL\u670d\u52a1\u5668\u7684\u914d\u7f6e\u548c\u5f53\u524d\u5de5\u4f5c\u72b6\u6001 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4566"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4566"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4566\/revisions"}],"predecessor-version":[{"id":4771,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4566\/revisions\/4771"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}