mysql登录时,ERROR 1045 (28000): 错误解决办法
2017-10-14 04:26
661 查看
错误问题的描述:
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)
windows下,以上两个错误的解决方法
解决方法:
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
推荐书籍:
出处:http://www.cnblogs.com/zlslch/
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)
windows下,以上两个错误的解决方法
解决方法:
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
推荐书籍:
出处:http://www.cnblogs.com/zlslch/
相关文章推荐
- mysql登录时,ERROR 1045 (28000): 错误解决办法
- mysql登录时,ERROR 1045 (28000): 错误解决办法
- Mysql登录时报错 ERROR 1045 (28000): 错误解决办法
- linux登录MySQL,报错ERROR 1045 (28000)解决办法
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
- mysql 登录时报 ”1045 (28000):..." 错误解决办法
- 解决MySql登录错误ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ubuntu14.10下解决MYSQL安装错误:"ERROR 1045 (28000)
- MySQL5.7使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)【取消或重设root密码】
- mysql中出现 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的解决办法
- 解决Linux下MySQL登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor)问题
- Mysql登录时报 ERROR 1045 (28000)解决
- MySQL安装后出现“Error 1045(28000) Access Denied for user....."解决办法
- MySQL登录时报ERROR 1045 (28000): Access denied for user 的解决方法
- 解决初次登录MySQL出现ERROR 1045 (28000):Access denied for user 'root'@'localhost'问题
- MySQL无法登录问题-"ERROR 1045 (28000): Access denied for user 'root'@'localhost'"-之解决方法-密码重置
- mysql登录报错ERROR 1045 (28000的解决方法
- centos环境下登录mysql报 ERROR 1045 (28000)怎么解决
- 解决MySQL登录ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor)问题
- 解决mysql登录出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YSE)