Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Navicat connects to MySQL8.0

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to connect Navicat to MySQL8.0, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Today under a MySQL8.0, found that the Navicat can not connect, always reported an error of 1251

The reason is that the encryption method of the MySQL8.0 version is different from that of MySQL5.0, and the connection will report an error.

After trying many ways, I finally found one that can be achieved:

Change the encryption method

1. First enter mysql's root account through the command line:

PS C:\ Windows\ system32 > mysql-uroot-p

Then enter the password for root:

Enter password: * Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 18Server version: 8.0.11 MySQL Community Server-GPLCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >

two。 Change the encryption method:

Mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' password' PASSWORD EXPIRE NEVER;Query OK, 0 rows affected (0.10 sec)

3. Change the password:

Mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' password';Query OK, 0 rows affected (0.35 sec)

4. Refresh:

Mysql > FLUSH PRIVILEGES;Query OK, 0 rows affected (0.28 sec)

/ / if an error is reported, ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'%':

The remote access permission is incorrect. Select the database first, check it, and then change it:

Mysql > use mysql;Database changedmysql > select user,host from user +-+-+ | user | host | +-+-+ | mysql.infoschema | localhost | | mysql.session | localhost | mysql.sys | localhost | | root | localhost | +- -+-+ rows in set (0.00 sec) Thank you for reading this article carefully I hope it will be helpful for everyone to share Navicat how to connect MySQL8.0 content. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report