欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql遇到登录出现的问题_MySQL

程序员文章站 2024-01-14 16:56:46
...
bitsCN.com

在Windows系统中,mysql登录的时候出现了这样的错误:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

从网上找了一些办法,终于得到了解决,现在记录一下具体的解决方法:

c:/>sc stop mysql
c:/>mysqld --defaults-file="C:/MySQL/MySQLServer6.0/my.ini" --console --skip-grant-tables
重新开一个cmd
c:/>mysql -uroot -p
enter password: mysql>UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit

bitsCN.com
相关标签: Windows mysql