回答編集履歴

5

訂正

2022/09/07 06:05

投稿

quickquip
quickquip

スコア11038

test CHANGED
@@ -45,6 +45,6 @@
45
45
  ```
46
46
  ps aux | grep mysql | grep -v grep
47
47
  ```
48
- してmysqldが起動していることを確認して`mysql`からalter tableする。
48
+ してmysqldが起動していることを確認して`mysql`からalter userする。
49
49
 
50
50
  と確実に手順ごとに望む動作になっているかを確認していったらいいかと思いました。

4

些細

2022/09/07 03:21

投稿

quickquip
quickquip

スコア11038

test CHANGED
@@ -34,7 +34,7 @@
34
34
  ```
35
35
  あたりを実行して空になる(=mysqldが実行されてない)ことを確認。
36
36
 
37
- `mysqld_safe --skip-grant-tables`と`'&`を付けずに**フォアグラウンドで**実行して
37
+ `mysqld_safe --skip-grant-tables`と`&`を付けずに**フォアグラウンドで**実行して
38
38
  ```
39
39
  【時刻】 mysqld_safe Logging to '/opt/homebrew/var/mysql/【マシン名】.local.err'.
40
40
  【時刻】 mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql

3

追記

2022/09/07 03:21

投稿

quickquip
quickquip

スコア11038

test CHANGED
@@ -25,3 +25,26 @@
25
25
  ```
26
26
  でもよさそうです。 [参考](https://gist.github.com/fallwith/987731?permalink_comment_id=3484384#gistcomment-3484384)
27
27
  homebrewでインストールした直後の状態になるので、rootパスワードも空になります。
28
+
29
+ ----
30
+ (追記)
31
+ `mysqld_safe --skip-grant-tables`する前に
32
+ ```
33
+ ps aux | grep mysql | grep -v grep
34
+ ```
35
+ あたりを実行して空になる(=mysqldが実行されてない)ことを確認。
36
+
37
+ `mysqld_safe --skip-grant-tables`と`'&`を付けずに**フォアグラウンドで**実行して
38
+ ```
39
+ 【時刻】 mysqld_safe Logging to '/opt/homebrew/var/mysql/【マシン名】.local.err'.
40
+ 【時刻】 mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql
41
+ ```
42
+ とでてプロンプトに復帰しないことを確認。
43
+
44
+ 別のターミナルで
45
+ ```
46
+ ps aux | grep mysql | grep -v grep
47
+ ```
48
+ してmysqldが起動していることを確認して`mysql`からalter tableする。
49
+
50
+ と確実に手順ごとに望む動作になっているかを確認していったらいいかと思いました。

2

追記

2022/09/06 09:49

投稿

quickquip
quickquip

スコア11038

test CHANGED
@@ -3,7 +3,7 @@
3
3
  mysql.server stop
4
4
  ```
5
5
  で`SUCCESS!`と出ているのに、mysqlは停止していなくてpidファイルだけ消えているということが時々起こりますね。
6
-
6
+ 追記: mysqlは停止しているのにpidファイルは残っている も遭遇しました
7
7
 
8
8
  ```
9
9
  brew services stop mysql
@@ -24,4 +24,4 @@
24
24
  brew services start mysql
25
25
  ```
26
26
  でもよさそうです。 [参考](https://gist.github.com/fallwith/987731?permalink_comment_id=3484384#gistcomment-3484384)
27
- homebrewでインストールした直後の状態になるので、初期パスワードも空になります。
27
+ homebrewでインストールした直後の状態になるので、rootパスワードも空になります。

1

追記

2022/09/06 09:05

投稿

quickquip
quickquip

スコア11038

test CHANGED
@@ -23,5 +23,5 @@
23
23
  brew postinstall mysql
24
24
  brew services start mysql
25
25
  ```
26
- でもよさそうです。
26
+ でもよさそうです。 [参考](https://gist.github.com/fallwith/987731?permalink_comment_id=3484384#gistcomment-3484384)
27
27
  homebrewでインストールした直後の状態になるので、初期パスワードも空になります。