Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

196 lines (139 sloc) 8.72 kb
<!DOCTYPE html>
<html lang="zh">
<head>
<title>MySQL用户授权与密码修改</title>
<meta charset="utf-8" />
<link href="http://www.dqw.me/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="DQW's Blog Full Atom Feed" />
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="http://www.dqw.me/theme/gumby.css" />
<link rel="stylesheet" type="text/css" href="http://www.dqw.me/theme/style.css" />
<link rel="stylesheet" type="text/css" href="http://www.dqw.me/theme/pygment.css" />
<script src="http://www.dqw.me/theme/js/libs/modernizr-2.6.2.min.js"></script>
</head>
<body id="index" class="home">
<div class="container">
<div class="row">
<header id="banner" class="body">
<h1><a href="http://www.dqw.me">DQW's Blog <strong>用适合的技术解决实际的问题</strong></a></h1>
</header><!-- /#banner -->
<div id="navigation" class="navbar row">
<a href="#" gumby-trigger="#navigation &gt; ul" class="toggle"><i class="icon-menu"></i></a>
<ul class="columns">
<li><a href="http://www.dqw.me">Home</a></li>
<li><a href="http://www.dqw.me/pages/about.html">About</a></li>
</ul>
</div>
<section id="content" class="body">
<div class="row">
<div class="eleven columns">
<header>
<h2 class="entry-title">
<a href="http://www.dqw.me/mysqlyong-hu-shou-quan-yu-mi-ma-xiu-gai.html" rel="bookmark"
title="Permalink to MySQL用户授权与密码修改">MySQL用户授权与密码修改</a></h2>
</header>
<footer class="post-info">
<abbr class="published" title="2013-10-08T22:40:00">
二 08 十月 2013
</abbr>
<address class="vcard author">
By <a class="url fn" href="http://www.dqw.me/author/dqw.html">dqw</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content">
<h3>授权</h3>
<div class="highlight"><pre><span class="n">GRANT</span> <span class="n">ALL</span> <span class="n">PRIVILEGES</span> <span class="n">ON</span> <span class="o">*</span><span class="p">.</span><span class="o">*</span> <span class="n">TO</span> <span class="err">&#39;</span><span class="n">root</span><span class="sc">&#39;@&#39;</span><span class="mf">192.168.56</span><span class="p">.</span><span class="o">%</span><span class="err">&#39;</span><span class="p">;</span>
<span class="n">FLUSH</span> <span class="n">PRIVILEGES</span><span class="p">;</span>
</pre></div>
<h3>密码修改</h3>
<div class="highlight"><pre><span class="n">USE</span> <span class="n">mysql</span>
<span class="n">UPDATE</span> <span class="n">mysql</span><span class="p">.</span><span class="n">user</span> <span class="n">SET</span> <span class="n">Password</span><span class="o">=</span><span class="n">PASSWORD</span><span class="p">(</span><span class="err">&#39;</span><span class="mi">111111</span><span class="err">&#39;</span><span class="p">)</span> <span class="n">WHERE</span> <span class="n">User</span><span class="o">=</span><span class="err">&#39;</span><span class="n">bob</span><span class="err">&#39;</span> <span class="n">AND</span> <span class="n">Host</span><span class="o">=</span><span class="err">&#39;</span><span class="o">%</span><span class="p">.</span><span class="n">example</span><span class="p">.</span><span class="n">org</span><span class="err">&#39;</span><span class="p">;</span>
<span class="n">FLUSH</span> <span class="n">PRIVILEGES</span><span class="p">;</span>
</pre></div>
</div><!-- /.entry-content -->
</div><!-- /.eleven.columns -->
<div class="three columns">
<h4>Pages</h4>
<ul>
<li><a href="http://www.dqw.me/pages/about.html">About</a></li>
</ul>
<h4>Categories</h4>
<ul>
<li><a href="http://www.dqw.me/category/apache.html">apache</a></li>
<li><a href="http://www.dqw.me/category/centos.html">centos</a></li>
<li><a href="http://www.dqw.me/category/dokuwiki.html">dokuwiki</a></li>
<li><a href="http://www.dqw.me/category/javascript.html">javascript</a></li>
<li><a href="http://www.dqw.me/category/linux.html">Linux</a></li>
<li><a href="http://www.dqw.me/category/macos.html">macos</a></li>
<li><a href="http://www.dqw.me/category/mysql.html">MySQL</a></li>
<li><a href="http://www.dqw.me/category/other.html">other</a></li>
<li><a href="http://www.dqw.me/category/pelican.html">pelican</a></li>
<li><a href="http://www.dqw.me/category/php.html">php</a></li>
<li><a href="http://www.dqw.me/category/xie-yi.html">协议</a></li>
</ul>
<h4>Tags</h4>
<ul>
<li class="tag-4"><a href="http://www.dqw.me/tag/github.html">github</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/pelican.html">pelican</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/.html"></a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/ubuntu.html">Ubuntu</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/http.html">http</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/nginx.html">nginx</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/suo-yin.html">索引</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/https.html">https</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/macos.html">macos</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/replication.html">replication</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/cconv.html">cconv</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/centos.html">centos</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/apache.html">apache</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/homebrew.html">homebrew</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/xie-yi.html">协议</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/rewrite.html">rewrite</a></li>
<li class="tag-0"><a href="http://www.dqw.me/tag/mysql.html">mysql</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/vga.html">VGA</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/dokuwiki.html">dokuwiki</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/php.html">php</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/cookie.html">cookie</a></li>
<li class="tag-2"><a href="http://www.dqw.me/tag/fen-bian-lu.html">分辨率</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/shu-zu.html">数组</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/javascript.html">javascript</a></li>
<li class="tag-4"><a href="http://www.dqw.me/tag/zim.html">zim</a></li>
</ul>
<nav class="widget">
<h4>LINKS</h4>
<ul>
<li><a href="feeds/all.atom.xml" target="_blank">RSS</a></li>
<li><a href="https://github.com/dqw" target="_blank">github</a></li>
<li><a href="http://www.douban.com/people/47947350/" target="_blank">douban</a></li>
<li><a href="http://dqw3721.blog.51cto.com/" target="_blank">以前51cto上的Blog</a></li>
<li><a href="http://dqw3721.cnblogs.com/" target="_blank">以前cnblogs上的Blog</a></li>
<li><a href="http://www.dqw.me/sitemap.xml" target="_blank">sitemap</a></li>
</ul>
</nav>
</div> </div><!-- /.row -->
</section>
</div><!-- /.row -->
</div><!-- /.container -->
<div class="container.nopad bg">
<footer id="credits" class="row">
<div class="seven columns left-center">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
<br />
Based on the <a target="_blank" href="http://gumbyframework.com">Gumby Framework</a>
</address>
</div>
<div class="seven columns">
<div class="row">
<ul class="socbtns">
</ul>
</div>
</div>
</footer>
</div>
<script src="http://www.dqw.me/theme/js/libs/jquery-1.9.1.min.js"></script>
<script src="http://www.dqw.me/theme/js/libs/gumby.min.js"></script>
<script src="http://www.dqw.me/theme/js/plugins.js"></script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.