mysql登录时,ERROR 1045 (28000): 错误解决办法
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql登录时,ERROR 1045 (28000): 错误解决办法,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2494字,纯文字阅读大概需要4分钟。
内容图文
![mysql登录时,ERROR 1045 (28000): 错误解决办法](/upload/InfoBanner/zyjiaocheng/471/68d4516c39e840d6b517660aae3189f9.jpg)
1、找到配置文件my.ini ,然后将其打开,可以选择用NotePadd++打开
2、打开后,搜索mysqld关键字
找到后,在mysqld下面添加skip-grant-tables,保存退出。
PS:若提示不让保存时,可以将该文件剪切到桌面,更改保存后再复制到mySQL目录下
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It‘s a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
skip-grant-tables
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = D:\SoftWare\MySQL\mysql-5.7.11-winx64
datadir = D:\SoftWare\MySQL\mysql-5.7.11-winx64\Data
port = 3306
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
这样,是用于跳过密码问题,但是呢,这并不能彻底解决!
3、重启mysql服务
在任何路径目录下,都可以关闭/重启mysql的服务呢。(因为,之前,已经配置全局的环境变量了)
net stop mysql
net start mysql
4、进入数据库,重设置密码。
mysql -u root -p Enter
不用管password Enter
mysql> use mysql; Enter
mysql> update mysql.user set authtntication_string=password(‘rootroot‘) where user=‘root‘; (密码自己设)
mysql> flush privileges; 刷新数据库
mysql> quit;
5、密码重设置成功,改好之后,再修改一下my.ini这个文件,把我们刚才加入的"skip-grant-tables"这行删除,保存退出再重启mysql服务就可以了。
6、重启mysql服务,并登录mysql用户,用户是root,密码是rootroot。
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin> net stop mysql
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin> net start mysql
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin>mysql -u root -p
Enter password:rootroot
感谢下面的博主:
http://www.ithao123.cn/content-10746582.html
mysql登录时,ERROR 1045 (28000): 错误解决办法
标签:
本文系统来源:http://www.cnblogs.com/zlslch/p/5937784.html
内容总结
以上是互联网集市为您收集整理的mysql登录时,ERROR 1045 (28000): 错误解决办法全部内容,希望文章能够帮你解决mysql登录时,ERROR 1045 (28000): 错误解决办法所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。