teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

文鳥の修正

2021/01/24 11:02

投稿

yozakura_dayo
yozakura_dayo

スコア4

title CHANGED
File without changes
body CHANGED
@@ -11,33 +11,25 @@
11
11
 
12
12
  DockerやHerokuにお詳しい方ご教授お願いできませんでしょうか。
13
13
 
14
+ 追記
15
+ [https://qiita.com/hayano-t/items/a074f1f2f889d7e92fcc](https://qiita.com/hayano-t/items/a074f1f2f889d7e92fcc)
14
- ### 発生しているエラーメッセージ
16
+ を参考に、heoku stackを18、
15
17
 
16
- ``` 
17
- $ heroku run rails db:migrate
18
+ database.ymlに下記を追記しました。
18
19
 
19
- rails aborted!
20
+ production:
20
- ActiveRecord::ConnectionNotEstablished: SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
21
+ url: <%= ENV['DATABASE_URL'] %>
21
22
 
22
- (中略)
23
+ しかし、下記のエラーが出ている状態です。
23
- Caused by:
24
+ ```ターミナル
24
- Mysql2::Error::ConnectionError: SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
25
+ ActiveRecord::ConnectionNotEstablished: Access denied for user 'bead377f5a56c8'@'ip-10-0-118-207.ec2.internal' (using password: YES)
26
+
25
27
  (中略)
26
- ```
27
28
 
29
+ Mysql2::Error::ConnectionError: Access denied for user 'bead377f5a56c8'@'ip-10-0-118-207.ec2.internal' (using password: YES)
28
30
  ```
29
- $ heroku run rails db:migrate:status
30
31
 
31
- rails aborted!
32
- ActiveRecord::ConnectionNotEstablished: SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
33
32
 
34
- (中略)
35
- Caused by:
36
- Mysql2::Error::ConnectionError: SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
37
- (中略)
38
- ```
39
-
40
-
41
33
  ### 該当のソースコード
42
34
 
43
35
  ```
@@ -64,6 +56,7 @@
64
56
  database: myapp_production
65
57
  username: myapp
66
58
  password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>
59
+  url: <%= ENV['DATABASE_URL'] %>
67
60
  ```
68
61
 
69
62
  ```ここに言語を入力