質問編集履歴

5

誤字

2021/01/03 04:28

投稿

kisagi
kisagi

スコア7

test CHANGED
File without changes
test CHANGED
@@ -200,7 +200,7 @@
200
200
 
201
201
 
202
202
 
203
- ### 2. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
203
+ ### 4. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
204
204
 
205
205
 
206
206
 

4

ls /usr/local/var/mysql/*.pidの追加

2021/01/03 04:28

投稿

kisagi
kisagi

スコア7

test CHANGED
File without changes
test CHANGED
@@ -233,3 +233,17 @@
233
233
  2021-01-03T04:17:13.716544Z 0 [ERROR] Aborting
234
234
 
235
235
  ```
236
+
237
+
238
+
239
+ - `ls /usr/local/var/mysql/*.pid`
240
+
241
+
242
+
243
+ ```
244
+
245
+ hoge@Hoge ~ % ls /usr/local/var/mysql/*.pid
246
+
247
+ zsh: no matches found: /usr/local/var/mysql/*.pid
248
+
249
+ ```

3

質問番号1, 4の修正

2021/01/03 04:26

投稿

kisagi
kisagi

スコア7

test CHANGED
File without changes
test CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
 
8
8
 
9
- 1. my.confが自動で作成されない.
9
+ 1. my.cnfが自動で作成されない.
10
-
10
+
11
- 2. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
11
+ 2. ~~Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ~~
12
-
12
+
13
- 3. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
13
+ 3. ~~Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)~~
14
14
 
15
15
  4. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
16
16
 
@@ -158,15 +158,53 @@
158
158
 
159
159
 
160
160
 
161
- - 手動で作成する
161
+ #### アプローチ
162
+
163
+
164
+
162
-
165
+ - `/usr/local/Cellar/mysql@5.7/5.7.32/.bottle/etc/my.cnf`からコピーして`/usr/local/etc/my.cnf`とした.
163
-
164
-
166
+
167
+
168
+
165
- ```
169
+ ```
170
+
166
-
171
+ hoge@Hoge ~ % find /usr/local/Cellar/mysql@5.7 -name "my*.cnf"
172
+
173
+ /usr/local/Cellar/mysql@5.7/5.7.32/.bottle/etc/my.cnf
174
+
175
+
176
+
177
+
178
+
179
+ hoge@Hoge ~ % cp /usr/local/Cellar/mysql@5.7 /usr/local/etc/my.cnf
180
+
181
+
182
+
183
+
184
+
185
+
186
+
167
- hoge@Hoge ~ % sudo vim /etc/my.cnf
187
+ hoge@Hoge ~ % mysql --help | grep my.cnf
188
+
168
-
189
+ order of preference, my.cnf, $MYSQL_TCP_PORT,
190
+
191
+ /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
192
+
193
+ ```
194
+
195
+
196
+
169
- Password:
197
+ #### 参考
198
+
199
+ - [Homebrewで入れたMySQLのmy-xxx.cnfの場所とmy.cnfの設置](https://qiita.com/madai0517/items/4df3ac0ce002301c7059)
200
+
201
+
202
+
203
+ ### 2. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
204
+
205
+
206
+
207
+ ```
170
208
 
171
209
  hoge@Hoge ~ % mysql.server start
172
210
 
@@ -178,360 +216,20 @@
178
216
 
179
217
 
180
218
 
181
- ```
182
-
183
- [mysqld]
184
-
185
- socket=/tmp/mysql.sock
186
-
187
-
188
-
189
- [client]
190
-
191
- socket=/tmp/mysql.soc
192
-
193
- ```
194
-
195
-
196
-
197
- #### 参考
198
-
199
- - [Homebrewで入れたMySQLのmy-xxx.cnfの場所とmy.cnfの設置](https://qiita.com/madai0517/items/4df3ac0ce002301c7059)
200
-
201
- - [[MySQL] my.cnf の設定方法 (Mac + Homebrew 編)](https://codenote.net/mysql/3579.html)
202
-
203
- - [mampでのmy.cnfファイルの作り方がわかりません(mac)](https://teratail.com/questions/197701)
204
-
205
- - [基礎MySQL ~その2~ my.cnf (設定ファイル)](https://qiita.com/yoheiW@github/items/bcbcd11e89bfc7d7f3ff)
206
-
207
-
208
-
209
- ### 2. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
210
-
211
-
212
-
213
219
  #### エラー詳細
214
220
 
215
-
216
-
217
- ```
218
-
219
- hoge@Hoge ~ % mysql_secure_installation
220
-
221
-
222
-
223
- Securing the MySQL server deployment.
224
-
225
-
226
-
227
- Enter password for user root:
228
-
229
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
230
-
231
- ```
232
-
233
-
234
-
235
- #### アプローチ
236
-
237
-
238
-
239
- ```
240
-
241
- hoge@Hoge ~ % sudo touch /tmp/mysql.sock
242
-
243
- Password:
244
-
245
- hoge@Hoge ~ % mysql_secure_installation
246
-
247
-
248
-
249
- Securing the MySQL server deployment.
250
-
251
-
252
-
253
- Enter password for user root:
254
-
255
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
256
-
257
- ```
258
-
259
-
260
-
261
- #### 参考
262
-
263
-
264
-
265
- - [mysql起動時でエラーが起きた時の対処](https://qiita.com/makuramoto1/items/52159370d00bef708595)
266
-
267
-
268
-
269
- ### 3. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
270
-
271
-
272
-
273
- #### エラー詳細
274
-
275
-
276
-
277
- ```
278
-
279
- hoge@Hoge ~ % mysql_secure_installation
280
-
281
-
282
-
283
- Securing the MySQL server deployment.
284
-
285
-
286
-
287
- Enter password for user root:
288
-
289
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
290
-
291
- ```
292
-
293
-
294
-
295
- #### アプローチ
296
-
297
-
298
-
299
- ```
300
-
301
- hoge@Hoge ~ % ls -la /tmp/mysql.sock
302
-
303
- -rw-r--r-- 1 root _mysql 0 1 2 23:59 /tmp/mysql.sock
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
- hoge@Hoge ~ % cd /tmp
312
-
313
- hoge@Hoge /tmp % chown -R _mysql:wheel /tmp/mysql.sock
314
-
315
- chown: /tmp/mysql.sock: Operation not permitted
316
-
317
- hoge@Hoge /tmp % sudo chown -R _mysql:wheel /tmp/mysql.sock
318
-
319
- Password:
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
- hoge@Hoge /tmp % mysql.server start
328
-
329
- Starting MySQL
330
-
331
- ./usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 626: /usr/local/var/mysql/Hoge.local.err: No such file or directory
332
-
333
- Logging to '/usr/local/var/mysql/Hoge.local.err'.
334
-
335
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 144: /usr/local/var/mysql/Hoge.local.err: No such file or directory
336
-
337
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 198: /usr/local/var/mysql/Hoge.local.err: No such file or directory
338
-
339
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 885: /usr/local/var/mysql/Hoge.local.err: No such file or directory
340
-
341
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 144: /usr/local/var/mysql/Hoge.local.err: No such file or directory
342
-
343
- ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
- hoge@Hoge /tmp % mysql_secure_installation
352
-
353
-
354
-
355
- Securing the MySQL server deployment.
356
-
357
-
358
-
359
- Enter password for user root:
360
-
361
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
362
-
363
- ```
364
-
365
-
366
-
367
- ### 4. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
368
-
369
-
370
-
371
- ####エラー詳細
372
-
373
-
374
-
375
- ```
376
-
377
- hoge@Hoge /tmp % mysql.server start
378
-
379
- Starting MySQL
380
-
381
- ./usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 626: /usr/local/var/mysql/Hoge.local.err: No such file or directory
382
-
383
- Logging to '/usr/local/var/mysql/Hoge.local.err'.
384
-
385
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 144: /usr/local/var/mysql/Hoge.local.err: No such file or directory
386
-
387
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 198: /usr/local/var/mysql/Hoge.local.err: No such file or directory
388
-
389
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 885: /usr/local/var/mysql/Hoge.local.err: No such file or directory
390
-
391
- /usr/local/Cellar/mysql@5.7/5.7.32/bin/mysqld_safe: line 144: /usr/local/var/mysql/Hoge.local.err: No such file or directory
392
-
393
- ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
394
-
395
- ```
396
-
397
-
398
-
399
- #### アプローチ
400
-
401
-
402
-
403
- - `/usr/local/var/mysql`を作成すると,ファイルが自動で作成される
404
-
405
-
406
-
407
- ```
408
-
409
- hoge@Hoge % mkdir /usr/local/var/mysql
410
-
411
- hoge@Hoge % ls /usr/local/var/mysql
412
-
413
- Hoge.local.err ca-key.pem client-cert.pem ib_buffer_pool ib_logfile1 private_key.pem server-cert.pem
414
-
415
- auto.cnf ca.pem client-key.pem ib_logfile0 ibdata1 public_key.pem server-key.pem
416
-
417
- hoge@Hoge /tmp % mysql_secure_installation
418
-
419
-
420
-
421
- Securing the MySQL server deployment.
422
-
423
-
424
-
425
- Enter password for user root:
426
-
427
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
- hoge@Hoge /tmp % mysql.server start
436
-
437
- Starting MySQL
438
-
439
- .. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
440
-
441
- ```
442
-
443
-
444
-
445
- - PIDファイルを作成してみる
446
-
447
-
448
-
449
- ```
450
-
451
- hoge@Hoge /tmp % touch /usr/local/var/mysql/Hoge.local.pid
452
-
453
- hoge@Hoge /tmp % ls /usr/local/var/mysql/
454
-
455
- Hoge.local.err ca-key.pem client-cert.pem ib_buffer_pool ib_logfile1 private_key.pem server-cert.pem
456
-
457
- auto.cnf ca.pem client-key.pem ib_logfile0 ibdata1 public_key.pem server-key.pem
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
- hoge@Hoge /tmp % sudo touch /usr/local/var/mysql/Hoge.local.pid
466
-
467
- Password:
468
-
469
- hoge@Hoge /tmp % ls /usr/local/var/mysql/
470
-
471
- Hoge.local.err auto.cnf ca.pem client-key.pem ib_logfile0 ibdata1 public_key.pem server-key.pem
472
-
473
- Hoge.local.pid ca-key.pem client-cert.pem ib_buffer_pool ib_logfile1 private_key.pem server-cert.pem
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
- hoge@Hoge /tmp % mysql.server start
482
-
483
- Starting MySQL
484
-
485
- .. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hoge.local.pid).
486
-
487
- hoge@Hoge /tmp % ls /usr/local/var/mysql/
488
-
489
- Hoge.local.err ca-key.pem client-cert.pem ib_buffer_pool ib_logfile1 private_key.pem server-cert.pem
490
-
491
- auto.cnf ca.pem client-key.pem ib_logfile0 ibdata1 public_key.pem server-key.pem
492
-
493
- ```
494
-
495
-
496
-
497
- ## 補足
498
-
499
-
500
-
501
- - 起動中のプロセスはなし
502
-
503
-
504
-
505
- ```
506
-
507
- hoge@Hoge ~ % ps ax | grep mysql
508
-
509
- 16567 s000 S+ 0:00.01 grep mysql
510
-
511
- ```
512
-
513
-
514
-
515
- - パスワードを求められる
516
-
517
-
518
-
519
- ```
520
-
521
- hoge@Hoge ~ % mysql_secure_installation
522
-
523
-
524
-
525
- Securing the MySQL server deployment.
526
-
527
-
528
-
529
- Enter password for user root:
530
-
531
- Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
532
-
533
- ```
534
-
535
-
536
-
537
- - `/usr/local/var/mysql/Hoge.local.err`
221
+ - `/usr/local/var/mysql/Hoge.local.err`ERROR抜粋
222
+
223
+
224
+
225
+ ```
226
+
227
+ 2021-01-03T04:17:13.707342Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
228
+
229
+ 2021-01-03T04:17:13.716502Z 0 [ERROR] Could not create unix socket lock file /tmp/mysql.sock.lock.
230
+
231
+ 2021-01-03T04:17:13.716529Z 0 [ERROR] Unable to setup unix socket lock file.
232
+
233
+ 2021-01-03T04:17:13.716544Z 0 [ERROR] Aborting
234
+
235
+ ```

2

誤字の修正

2021/01/03 04:21

投稿

kisagi
kisagi

スコア7

test CHANGED
File without changes
test CHANGED
@@ -154,7 +154,7 @@
154
154
 
155
155
 
156
156
 
157
- ### 1. my.cnfが作成されない
157
+ ### 1. my.cnfが自動で作成されない
158
158
 
159
159
 
160
160
 
@@ -196,7 +196,7 @@
196
196
 
197
197
  #### 参考
198
198
 
199
- - [Homebrewで入れたMySQLのmy-xxx.cnfの場所とmy.cnfの設置](https://www.notion.so/5f09245f757b4a1ebd1dbf0906f69f4e#05e2ad48eeb148aca339c807d6f41097)
199
+ - [Homebrewで入れたMySQLのmy-xxx.cnfの場所とmy.cnfの設置](https://qiita.com/madai0517/items/4df3ac0ce002301c7059)
200
200
 
201
201
  - [[MySQL] my.cnf の設定方法 (Mac + Homebrew 編)](https://codenote.net/mysql/3579.html)
202
202
 

1

補足の追加

2021/01/03 02:32

投稿

kisagi
kisagi

スコア7

test CHANGED
File without changes
test CHANGED
@@ -491,3 +491,47 @@
491
491
  auto.cnf ca.pem client-key.pem ib_logfile0 ibdata1 public_key.pem server-key.pem
492
492
 
493
493
  ```
494
+
495
+
496
+
497
+ ## 補足
498
+
499
+
500
+
501
+ - 起動中のプロセスはなし
502
+
503
+
504
+
505
+ ```
506
+
507
+ hoge@Hoge ~ % ps ax | grep mysql
508
+
509
+ 16567 s000 S+ 0:00.01 grep mysql
510
+
511
+ ```
512
+
513
+
514
+
515
+ - パスワードを求められる
516
+
517
+
518
+
519
+ ```
520
+
521
+ hoge@Hoge ~ % mysql_secure_installation
522
+
523
+
524
+
525
+ Securing the MySQL server deployment.
526
+
527
+
528
+
529
+ Enter password for user root:
530
+
531
+ Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
532
+
533
+ ```
534
+
535
+
536
+
537
+ - `/usr/local/var/mysql/Hoge.local.err`