简体   繁体   English

在Windows上设置MySQL比在Linux上难得多吗?

[英]Is setting up MySQL much harder on Windows than Linux?

I have spent hours just trying to set up MySQL and still no success(on windows). 我已经花了几个小时尝试建立MySQL,但仍然没有成功(在Windows上)。 I am starting to doubt my very name. 我开始怀疑我的名字。

When I try to configure it says: 当我尝试配置时说:

"The security settings could not be applied. Error Number 1045. Access denied for user 'root'@'localhost' (usin passwrd: NO) “无法应用安全设置。错误号1045。对用户'root'@'localhost'的访问被拒绝(使用passwrd:NO)

And before it kept rejecting my password. 在此之前,它一直拒绝我的密码。

http://www.wampserver.com/en/download.php http://www.wampserver.com/en/download.php

Use it, love it, stop wasting time and get programming! 使用它,喜欢它,不要浪费时间,开始编程!

OR YOU CAN TRY THIS.... 或者您可以尝试...。

If you actually have set a root password and you've just lost/forgotten it: 如果您实际上已经设置了root密码,而您刚刚丢失/忘记了它:

Stop MySQL Restart it manually with the skip-grant-tables option: mysqld_safe --skip-grant-tables 停止MySQL使用skip-grant-tables选项手动重新启动它:mysqld_safe --skip-grant-tables

Run the MySQL client: mysql -u root 运行MySQL客户端:mysql -u root

Reset the root password manually with this MySQL command: UPDATE mysql.user SET 使用以下MySQL命令手动重置根密码:UPDATE mysql.user SET

Password=PASSWORD('password') WHERE User='root'; 密码= PASSWORD('密码')用户='root';

Flush the privileges with this MySQL command: FLUSH PRIVILEGES; 使用以下MySQL命令清除特权:FLUSH PRIVILEGES;

From http://www.tech-faq.com/reset-mysql-password.shtml http://www.tech-faq.com/reset-mysql-password.shtml

MySQL - ERROR 1045 - Access denied MySQL-错误1045-访问被拒绝

I had this (frustrating) issue as well. 我也有这个(令人沮丧的)问题。 What I did was: 我所做的是:

  • Uninstall MySQL 卸载MySQL
  • Delete the folder C:\\ProgramData\\MySQL\\ 删除文件夹C:\\ ProgramData \\ MySQL \\
  • Install MySQL again 再次安装MySQL

Hope it works for you as well. 希望它也对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM