当前位置:网站首页>Navicat connection MySQL error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
Navicat connection MySQL error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
2022-07-30 21:40:00 【Timely movement】
Article Directory
- navicat connection MySQL error: 1045 - Access denied for user 'root'@'localhost' (using password: YES)
- Question:
- Reason:
- Solution:
- If you forget the database password, follow the steps, if not, skip 123
- 1. Find the MySQL configuration file my.ini
- 2. Add skip-grant-tables under **[mysqld] entry to save and exit
- 3. Restart mysql
- 4. Enter MySQL client
- 5. Enter the MySQL database and reset the password
- 6. Delete the content of step 2, then restart
- 7. Test
navicat connection MySQL error: 1045 - Access denied for user 'root'@'localhost' (using password: YES)
Question:
I haven't used the database for a long time. I need to use it for a project recently, but when I use Navicat to connect to the database, I get an error: 1045 - Access denied for user 'root'@'localhost' (using password: YES)
Reason:
Because of the characteristics of MySQL8, the login of the root user is closed, and the new version of the official website has an introduction
Solution:
If you forget the database password, follow the steps, if not, skip 123
This file is in the MySQL installation directory
If you forget where to install it, you can find the installation directory through the command line
"win"+"r" Enter cmd to open the command linemysql -u root -p Enter the password to open the MySQL clientshow variables like "%char% View the installation path
1. Find the MySQL configuration file my.ini
2. Add skip-grant-tables under **[mysqld] entry to save and exit
3. Restart mysql
Enter at the command line
Stop: net stop mysqlStart: net start mysql
4. Enter MySQL client
At this time, enter mysql -u root -p in cmd to log in without a password. When password: appears, press Enter to enter
5. Enter the MySQL database and reset the password
#Enter the databaseuse mysql#reset passwordupdate mysql.user set authentication_string=password('root') where user='root'# refresh the databaseflush mysql#quitquit
6. Delete the content of step 2, then restart
7.Test
Edit connection, enter new password
Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
随机推荐
DPW-SDNet: Dual Pixel-Wavelet Domain Deep CNNs for Soft Decoding of JPEG-Compressed Images
Simple configuration of three-tier architecture
Detailed explanation of the delete problem of ClickHouse delete data
NEOVIM下载安装与配置
解决centos8 MySQL密码问题ERROR 1820 (HY000) You must reset your password using ALTER USER
微信公众号授权登录后报redirect_uri参数错误的问题
(7/29)基础板子最小生成树prim+kruskal
系统结构考点之多级混洗交换网络
MySql 5.7.38 download and installation tutorial, and realize the operation of MySql in Navicat
手把手教你搭建一台永久运行的个人服务器
LeetCode·23.合并K个升序链表·递归·迭代
3分钟带你了解微信小程序开发
How do I refresh the company's background management system (Part 1) - performance optimization
登堂入室之soc开发makefile
navicat新建数据库
cnpm安装步骤
MySQL 用户授权
go慢速入门——函数
ClickHouse删除数据之delete问题详解
TransGAN code reproduction - Jiutian Bisheng Platform