<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[ERROR 1045 (28000): Access denied for user root@localhost]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sun, 09 May 2010 17:02:31 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	我的系统是linux，最近新装好的mysql在进入mysql工具时，总是有错误提示:<br/># mysql -uroot -p<br/>Enter password:<br/>ERROR 1045 (28000): Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)<br/><br/>使用网上介绍的方法修改root用户的密码：<br/># mysqladmin -uroot -p password &#039;newpassword&#039;<br/>Enter password:<br/>mysqladmin: connect to server at &#039;localhost&#039; failed<br/>error: &#039;Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: YES)&#039;<br/><br/>现在终于被我找到了解决方法，如下（请先测试方法三，谢谢！）：<br/>方法一：<br/># /etc/init.d/mysql stop<br/># mysqld_safe --user=mysql --skip-grant-tables --skip-networking &amp;<br/># mysql -u root mysql<br/>mysql&gt; UPDATE user SET Password=PASSWORD(&#039;newpassword&#039;) where USER=&#039;root&#039;;<br/>mysql&gt; FLUSH PRIVILEGES;<br/>mysql&gt; quit<br/><br/># /etc/init.d/mysql restart<br/># mysql -uroot -p<br/>Enter password: &lt;输入新设的密码newpassword&gt;<br/><br/>mysql&gt;<br/><br/><br/>方法二：<br/>直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:<br/># mysql -udebian-sys-maint -p<br/>Enter password: &lt;输入[client]节的密码&gt;<br/>mysql&gt; UPDATE user SET Password=PASSWORD(&#039;newpassword&#039;) where USER=&#039;root&#039;;<br/>mysql&gt; FLUSH PRIVILEGES;<br/>mysql&gt; quit<br/><br/># mysql -uroot -p<br/>Enter password: &lt;输入新设的密码newpassword&gt;<br/><br/>mysql&gt;<br/><br/><br/>方法三：<br/>这种方法我没有进行过测试，因为我的root用户默认密码已经被我修改过了，那位有空测试一下，把结果告诉我，谢谢！！<br/># mysql -uroot -p<br/>Enter password: &lt;输入/etc/mysql/debian.cnf文件中[client]节提供的密码&gt;<br/><br/>至此，困惑多时的问题解决了！<br/><br/><br/>关于这个问题，在网上找了好多方法都不管用<br/><br/>我用的php-4.4.1+mysql-4.0.26+Windows2000专业版搭建的环境<br/><br/>PhpMyAdmin2.11.4 版本。<br/><br/>当以此安装完后在WEB目录下安装了Discuz!6.0.0版本的论坛成功。<br/><br/>然后在安装PhpMyAdmin2.11.4 后出现问题：问题如题目&#123;&nbsp;&nbsp;&nbsp;&nbsp;mysql #1045 - Access denied for user &#039;root&#039;@&#039;localhost&#039; (using password: NO)&nbsp;&nbsp; &#125;<br/><br/>安装PhpMyAdmin2.11.4 很简单不多说了，直接下载解压缩放在web目录下就可以,我2000系统的目录是C:&#92;Inetpub&#92;wwwroot&#92;PhpMyAdmin<br/><br/>网上最多教的方法是从PhpMyAdmin&#92;libraries目录下 找到config.default.php 文件然后复制到根目录PhpMyAdmin下 改名字为 config.inc.php 然后修改里面的内容等等<br/><br/>但是在PhpMyAdmin2.11.4 版本里不需要，只要找到根目录下的config.sample.inc.php文件，复制里面的内容到新建文件config.inc.php里就可以了。 config.inc.php要放在根目录下。<br/><br/>然后修改里面的内容为如下：（只修改红色部分）<br/><br/>&lt;?php<br/>/* vim: set expandtab sw=4 ts=4 sts=4: */<br/>/**<br/>* phpMyAdmin sample configuration, you can use it as base for<br/>* manual configuration. For easier setup you can use scripts/setup.php<br/>*<br/>* All directives are explained in Documentation.html and on phpMyAdmin<br/>* wiki &lt;http://wiki.cihar.com&gt;.<br/>*<br/>* @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $<br/>*/<br/><br/>/*<br/>* This is needed for cookie based authentication to encrypt password in<br/>* cookie<br/>*/<br/>$cfg[&#039;blowfish_secret&#039;] = &#039;2156&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */<br/>//此句为注释不需要，上面的2156是随便值。<br/><br/>/*<br/>* Servers configuration<br/>*/<br/>$i = 0;<br/><br/>/*<br/>* First server<br/>*/<br/>$i++;<br/>/* Authentication type */<br/>$cfg[&#039;Servers&#039;][$i][&#039;auth_type&#039;] = &#039;cookie&#039;;<br/>/* Server parameters */<br/>$cfg[&#039;Servers&#039;][$i][&#039;host&#039;] = &#039;localhost&#039;;<br/>$cfg[&#039;Servers&#039;][$i][&#039;connect_type&#039;] = &#039;tcp&#039;;<br/>$cfg[&#039;Servers&#039;][$i][&#039;compress&#039;] = false;<br/>/* Select mysqli if your server has it */<br/>$cfg[&#039;Servers&#039;][$i][&#039;extension&#039;] = &#039;mysql&#039;;<br/>/* User for advanced features */<br/>$cfg[&#039;Servers&#039;][$i][&#039;controluser&#039;] = &#039;root&#039;;<br/>$cfg[&#039;Servers&#039;][$i][&#039;controlpass&#039;] = &#039;123456&#039;;<br/>/* Advanced phpMyAdmin features */<br/>// $cfg[&#039;Servers&#039;][$i][&#039;pmadb&#039;] = &#039;phpmyadmin&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;bookmarktable&#039;] = &#039;pma_bookmark&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;relation&#039;] = &#039;pma_relation&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;table_info&#039;] = &#039;pma_table_info&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;table_coords&#039;] = &#039;pma_table_coords&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;pdf_pages&#039;] = &#039;pma_pdf_pages&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;column_info&#039;] = &#039;pma_column_info&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;history&#039;] = &#039;pma_history&#039;;<br/>// $cfg[&#039;Servers&#039;][$i][&#039;designer_coords&#039;] = &#039;pma_designer_coords&#039;;<br/><br/>/*<br/>* End of servers configuration<br/>*/<br/><br/>/*<br/>* Directories for saving/loading files from server<br/>*/<br/>$cfg[&#039;UploadDir&#039;] = &#039;&#039;;<br/>$cfg[&#039;SaveDir&#039;] = &#039;&#039;;<br/><br/>?&gt;<br/><br/>基本工作完成，现在试着打开就会提示 如题的错误。<br/>方法是 在C:&#92;Inetpub&#92;wwwroot&#92;目录下新建个文件夹（例如：PMA）<br/><br/>然后把PhpMyAdmin文件夹拖到PMA目录下就OK了<br/><br/>访问的目录就应该是 http://localhost/PMA/phpmyadmin/index.php<br/><br/><br/>如果前一步$cfg[&#039;blowfish_secret&#039;] = &#039;2156&#039;; 没有设置任意值的话，会提示错误信息“配置文件现在需要绝密的短语密码（blowfish_secret）”<br/><br/>忘记设置的话，快补上喽，我也是新手，刚开始学PHP。 有不准确的描述多包含。<br/><br/><br/>本文来自CSDN博客，转载请标明出处：http://blog.csdn.net/fanenmin/archive/2008/03/31/2234350.aspx
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] ERROR 1045 (28000): Access denied for user root@localhost]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>