回答編集履歴
1
間違えました。
test
CHANGED
@@ -1,59 +1 @@
|
|
1
|
-
### 「find / -name "my.cnf" -ls 2>/dev/null」とコマンドを打つと、my.cnfと言うファイルを探しに行きます(時間が掛かります)。
|
2
|
-
|
3
|
-
```bash
|
4
|
-
|
5
|
-
nandymak$ find / -name "my.cnf" -ls 2>/dev/null
|
6
|
-
|
7
|
-
3586232 8 -rw-r--r-- 1 nandymak admin 212 9 19 19:43 /usr/local/etc/my.cnf
|
8
|
-
|
9
|
-
7830222 8 -rw-r--r-- 1 nandymak staff 145 6 27 04:02 /usr/local/Cellar/mysql/8.0.17_1/.bottle/etc/my.cnf
|
10
|
-
|
11
|
-
7819521 8 -rw-r--r-- 1 nandymak staff 113 12 21 2018 /usr/local/Cellar/mysql@5.6/5.6.43/.bottle/etc/my.cnf
|
12
|
-
|
13
|
-
nandymak$
|
14
|
-
|
15
|
-
```
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
### そこで見つかったmy.cnfの中身をすべて確認してください。上記の例であれば
|
20
|
-
|
21
|
-
```bash
|
22
|
-
|
23
|
-
$ cat /usr/local/etc/my.cnf | grep caching_sha2_password
|
24
|
-
|
25
|
-
$ cat /usr/local/Cellar/mysql/8.0.17_1/.bottle/etc/my.cnf | grep caching_sha2_password
|
26
|
-
|
27
|
-
$ cat /usr/local/Cellar/mysql@5.6/5.6.43/.bottle/etc/my.cnf | grep caching_sha2_password
|
28
|
-
|
29
|
-
```
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
### 上記の結果、以下の文字列が見つかったら、修正します。
|
34
|
-
|
35
|
-
```bash
|
36
|
-
|
37
|
-
default_authentication_plugin=caching_sha2_password
|
38
|
-
|
39
|
-
```
|
40
|
-
|
41
|
-
↓以下のように修正する。「=」の後ろです。
|
42
|
-
|
43
|
-
```bash
|
44
|
-
|
45
|
-
default_authentication_plugin=mysql_native_password
|
46
|
-
|
47
|
-
```
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
1
|
+
間違えて書き込んでしまいました。
|
52
|
-
|
53
|
-
```bash
|
54
|
-
|
55
|
-
$ brew services restart mysql@5.6
|
56
|
-
|
57
|
-
$ mysql -uroot
|
58
|
-
|
59
|
-
```
|