今日では、MySQL8.0の下で、私は常に1251を与えられて、Navicatはが接続されてないことが判明しました。
その理由は、MySQL8.0のバージョンである暗号化方式とMySQL5.0のない同じ接続エラー。
私は多くの方法を試みたが、最終的に達成する方法を見つけました:
変更の暗号化
1.まず、コマンドライン入力のmysqlに rootアカウントを:
1
|
PS C:\Windows\system32> mysql -uroot -p
|
次に、rootのパスワードを入力します。
1
2
3
4
5
6
7
8
9
10
|
Enter password : ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and / or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and / or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
|
2.暗号化方式を変更します。
1
2
|
mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.10 sec)
|
3.パスワードの変更:新しいパスワードは大文字と123であります
1
2
|
mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED WITH mysql_native_password BY '123' ;
Query OK, 0 rows affected (0.35 sec)
|
4.リフレッシュ:
1
2
|
mysql> FLUSH PRIVILEGES ;
Query OK, 0 rows affected (0.28 sec)
|
//エラーERROR 1396(HY000)場合は、次の操作のALTER USERは '%' @ 'ルート' に失敗しました:
リモートアクセスが選択し、正しくないデータベースを、その後の変更を見て:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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)
|