当前位置: 首页 >数据库 > windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案

windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案

简单粗暴

工具xwamp

路径:H:\xampp\mysql\bin\my.ini.php

打开my.ini,在[mysqld]下面添加

skip-exteal-locking
skip-name-resolve
skip-grant-tables

停止mysql ->打开xwamp的shell可以输入命令,如下

Setting environment for using XAMPP for Windows.mjay@DESKTOP-CGL9PRT h:\xampp# mysql urootERROR 1044 (42000): Access denied for user ''@'localhost' to database 'uroot'mjay@DESKTOP-CGL9PRT h:\xampp# mysql -u root -pEnter password: ******ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)重启mysql后mjay@DESKTOP-CGL9PRT h:\xampp# mysql -u root -pEnter password: ******(123456Welcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 2Server version: 10.1.9-MariaDB mariadb.org binary distributionCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> use mysqlDatabase changedMariaDB [mysql]> grant all privileges on *.* to root@localhost identified by 'mysql'->

然后重新登录 ok,成功

 

作者:MAKE-IN-LEMON
来源链接:https://www.cnblogs.com/lemonphp/p/5516044.html

版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaclub.cn/database/118012.html

分享给朋友:

“windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案” 的相关文章

MySQL表的增删改查(进阶) 2022年05月16日 21:54:11
MySQL数据库(基础) 2022年05月16日 21:54:19
MySQL主从复制 2022年05月17日 21:34:56
mysql查询结果中文显示成了问号 2022年06月07日 02:00:43
MYSQL查询某字段为空的数据 2022年06月08日 21:35:13
Mysql查询用户最后一次登陆时间 2022年06月12日 13:54:22
MYSQL优化建议 2022年06月18日 08:23:02