Navicat Connection MySQL8.0 Pro-Test effective

Source: Internet
Author: User

Ext.: https://www.cnblogs.com/shiysin/p/shiysin.html

Today under a MySQL8.0, found that navicat connection is not, always error 1251;

The reason is that the MySQL8.0 version of the encryption method and MySQL5.0 is not the same, the connection will be error.

Tried a lot of ways, and finally found a way to achieve:

Change the encryption method

  1. Enter the root account of MySQL from the command line first:

PS c:\windows\system32> Mysql-uroot-p

  Then enter the root password:

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) $, 2018, Oracle an d/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql>

2. 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 your 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 the error ERROR 1396 (HY000): Operation ALTER USER failed for root '% ' :

The remote access permissions are incorrect, select the database First, and then change the following:

mysql> Use mysql;database changed
Mysql> Select User,host from user;+------------------+-----------+| User | host |+------------------+-----------+| mysql.infoschema | localhost | | mysql.session | localhost | | Mysql.sys | localhost | | root | localhost |+------------------+-----------+5 rows in Set (0.00 sec)

(turn) Navicat connection MySQL8.0 Pro-Test effective

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.