`

mysql 安装出错解决办法

阅读更多

错误说明:

在安装mysql的时候,就会遇到以下错误。遇到错误不可怕,怕的就是被错误所击倒!

The security settings could not be applied to the database because the connection has failed with the following error.

Error Nr. 1045

Access denied for user 'root'@'localhost' (using password: YES)

If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.

If you are re-installing after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore the old password from your last installation is still needed to connect to the server. In this case please select skip now and re-run the Configuration Wizard from the start menu.

解决方法:

1, 控制面板卸载MySQL

2, 删除目录 C:\Documents and Settings\All Users\Application Data\MySQL

3.只有彻底删除上次install information之后才能安装,为确保起见,去搜索其他的mysql内容,你也有可能在别的地方安装过mysql的。

3, 重新安装MySQL 就好了

如何你C:\Documents and Settings\All Users下没有Application Data文件夹,选择:工具——文件夹选项——查看——选择显示所有文件和文件夹。

以上资料出自http://blog.csdn.net/windzou36/archive/2010/04/07/5460188.aspx

如果这样配置还是出错的话,取消退出向导

1.创建一个 txt文件 (例如 C:mysqlpassword.txt)),文件内容如下:

     UPDATE mysql.user SET Password=PASSWORD('yourpassword') WHERE User='root';
     FLUSH PRIVILEGES;

      

       2.打开命令行窗口并且执行如下命令

       "C:Program Files\MySQL\MySQL Server 5.4\bin\mysqld" -–defaults-file="C:Program             Files\MySQL\MySQL Server 5.4\my.ini" –-init-file=C:mysqlpassword.txt –standalone –console
       执行完后,保持窗口不关闭

       3.打开另外一个命令行窗口,执行如下命令
       "C:Program Files\MySQL\MySQL Server 5.4\bin\mysqladmin" -u root -p shutdown
       (输入在 mysqlpassword.txt 中指定的密码)

       4.再次执行 mysql 实例配置向导,Apply Security Settings应该能成功了

       此办法是从此http://ddgrow.com/mysql_p1

       http://bugs.mysql.com/bug.php?id=18555

       找到的

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics