<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[刘新修]]></title> 
<link>http://pic1.liuxinxiu.com:80/index.php</link> 
<description><![CDATA[刘新修的个人博客 (Liuxinxiu'S Blog)]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[刘新修]]></copyright>
<item>
<link>http://pic1.liuxinxiu.com:80/mysql_user/</link>
<title><![CDATA[Mysql更改用户密码]]></title> 
<author>刘新修 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[数据库技术]]></category>
<pubDate>Thu, 13 Mar 2014 07:08:51 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/mysql_user/</guid> 
<description>
<![CDATA[ 
	<p>10,启动mysql服务</p><p>[root@localhost mysql-5.5.33]# /etc/init.d/mysqld start</p><p>/usr/local/mysql/bin/mysqladmin -u root password '999999'</p><p>11,启动完成之后用ps -ef &#124;grep mysql 命令查看是否启动</p><p>12,/usr/local/mysql/bin/mysql -u root -p</p><p>通过命令行登录管理MySQL服务器 初始密码为空</p><p>13,修改root密码</p><p>mysql&gt;;use mysql;</p><p>mysql&gt;; update user set password=PASSWORD(&quot;999999&quot;) where user='root';</p><p>mysql&gt;; update user set host=&quot;%&quot; where user=&quot;root&quot; and host=&quot;localhost&quot;;</p><p>mysql&gt;; FLUSH PRIVILEGES;</p><p>mysql&gt;; flush privileges;</p><p>&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;&times;</p><p>删除host不是：%/127.0.0.1/localhost 的记录，删除用户字段为空的记录</p><p>delete from user where host !='%' and host !='127.0.0.1' and host !='localhost';</p><p>delete from user where user='';</p><p>delete from user where title like '%cheng人网%';</p><p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p><p>设置软链接方便执行mysql短标签命令【mysql -u root -p】</p><p>ln -sf /usr/local/mysql/bin/mysql /sbin/mysql</p><p>ln -sf /usr/local/mysql/bin/mysqladmin /sbin/mysqladmin</p><p>ln -sf /usr/local/mysql/bin/mysqldump /sbin/mysqldump</p><p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p><p>注册Apache为Service</p><p>cp /usr/local/apache/bin/apachectl /etc/init.d/httpd</p><p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p><p>就可以使用：</p><p>service httpd start</p><p>service httpd restart</p><p>service httpd stop</p><p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p><p>在末尾增加以下内容，自动启动服务：</p><p>vi /etc/rc.local</p><p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p><p>ulimit -SHn 65535</p><p>/etc/init.d/mysqld start</p><p>/etc/init.d/httpd start</p><div>&nbsp;</div>
]]>
</description>
</item><item>
<link>http://pic1.liuxinxiu.com:80/mysql_user/#blogcomment</link>
<title><![CDATA[[评论] Mysql更改用户密码]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://pic1.liuxinxiu.com:80/mysql_user/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>