質問編集履歴

2

より詳細に

2017/06/17 02:09

投稿

k-okina
k-okina

スコア16

test CHANGED
File without changes
test CHANGED
@@ -154,4 +154,72 @@
154
154
 
155
155
 
156
156
 
157
+ error logのもう1例 (文字制限のため切り取り
158
+
159
+ ```
160
+
161
+ Whoops, looks like something went wrong.
162
+
163
+ (2/2) QueryException
164
+
165
+ SQLSTATE[HY000] [2002] No such file or directory (SQL: select count(*) as aggregate from `users` where `email` = awef@a.a)
166
+
167
+ in Connection.php (line 647)
168
+
169
+ at Connection->runQueryCallback('select count(*) as aggregate from `users` where `email` = ?', array('awef@a.a'), object(Closure))
170
+
171
+ in Connection.php (line 607)
172
+
173
+ at Connection->run('select count(*) as aggregate from `users` where `email` = ?', array('awef@a.a'), object(Closure))
174
+
175
+ in Connection.php (line 326)
176
+
177
+ at Connection->select('select count(*) as aggregate from `users` where `email` = ?', array('awef@a.a'), false)
178
+
179
+
180
+
181
+ ...
182
+
183
+
184
+
185
+ (1/2) PDOException
186
+
187
+ SQLSTATE[HY000] [2002] No such file or directory
188
+
189
+ in Connector.php (line 68)
190
+
191
+ at PDO->__construct('mysql:unix_socket=/cloudsql/hogehoge-167400:us-central1:test;dbname=laravel', 'root', 'root', array(0, 2, 0, false, false))
192
+
193
+ in Connector.php (line 68)
194
+
195
+ at Connector->createPdoConnection('mysql:unix_socket=/cloudsql/hogehoge-167400:us-central1:test;dbname=laravel', 'root', 'root', array(0, 2, 0, false, false))
196
+
197
+ in Connector.php (line 44)
198
+
199
+ at Connector->createConnection('mysql:unix_socket=/cloudsql/hogehoge-167400:us-central1:test;dbname=laravel', array('driver' => 'mysql', 'host' => 'localhost', 'port' => '3306', 'database' => 'laravel', 'username' => 'root', 'password' => 'root', 'unix_socket' => '/cloudsql/hogehoge-167400:us-central1:test', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql'), array(0, 2, 0, false, false))
200
+
201
+ in MySqlConnector.php (line 24)
202
+
203
+ at MySqlConnector->connect(array('driver' => 'mysql', 'host' => 'localhost', 'port' => '3306', 'database' => 'laravel', 'username' => 'root', 'password' => 'root', 'unix_socket' => '/cloudsql/hogehoge-167400:us-central1:test', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql'))
204
+
205
+ in ConnectionFactory.php (line 183)
206
+
207
+ at ConnectionFactory->Illuminate\Database\Connectors\{closure}()
208
+
209
+ at call_user_func(object(Closure))
210
+
211
+ in Connection.php (line 883)
212
+
213
+ at Connection->getPdo()
214
+
215
+ in Connection.php (line 392)
216
+
217
+ at Connection->getPdoForSelect(false)
218
+
219
+ in Connection.php (line 318)
220
+
221
+ ```
222
+
223
+
224
+
157
225
  何日も、何十時間やっても動かなくて、本当に何卒よろしくお願いします、、、

1

追加

2017/06/17 02:09

投稿

k-okina
k-okina

スコア16

test CHANGED
File without changes
test CHANGED
@@ -1,10 +1,20 @@
1
1
  GAEでlaravelを動かす際に、cloud sdkを使って gcloud app deploy でローカルからとりあえずアップしてるのですが、正常に動きません。
2
2
 
3
- 内容は、LPは見れるのですが、cloud sqlとのコネクションの設定の記載が間違ってるのかと思うのですが、何が間違えているのか、2営業日使ってもわからなかったので、助けてくれると幸いです、、、
3
+ 内容は、LPは見れるのですが、cloud sqlとのコネクションの設定の記載が間違ってるのかと思うのですが、何が間違えているのか、日使ってもわからなかったので、助けてくれると幸いです、、、
4
+
5
+ GAEとCloud sqlは同一リージョンで、SQLにはGAEからは自由にアクセス可能と書いてあります。。。
6
+
7
+ rootユーザーのパスワードはrootと指定しています。
4
8
 
5
9
  何卒お願いします、、、、
6
10
 
11
+ laravelプロジェクトの状態
12
+
13
+ laravel new blogでプロジェクトを作成し、php artisan make:authでlogin画面とregister画面を作成して.envとapp.yamlを作成した状態です。
14
+
15
+
16
+
7
- 設定ファイル
17
+ .envの状態
8
18
 
9
19
  ```
10
20
 
@@ -24,7 +34,7 @@
24
34
 
25
35
  DB_CONNECTION=mysql
26
36
 
27
- DB_HOST=35.188.98.255
37
+ DB_HOST=localhost
28
38
 
29
39
  DB_PORT=3306
30
40
 
@@ -34,7 +44,7 @@
34
44
 
35
45
  DB_PASSWORD=root
36
46
 
37
- # DB_SOCKET="/cloudsql/practice-167400:us-central1:test"
47
+ DB_SOCKET="/cloudsql/hogehoge-167400:us-central1:test"
38
48
 
39
49
 
40
50
 
@@ -87,3 +97,61 @@
87
97
  APP_LOG=errorlog
88
98
 
89
99
  ```
100
+
101
+
102
+
103
+ app.yamlの状態
104
+
105
+ ```
106
+
107
+ runtime: php
108
+
109
+ env: flex
110
+
111
+
112
+
113
+ runtime_config:
114
+
115
+ document_root: public
116
+
117
+
118
+
119
+ beta_settings:
120
+
121
+ # for Cloud SQL, set this value to the Cloud SQL connection name,
122
+
123
+ cloud_sql_instances: "hogehoge-167400:us-central1:test"
124
+
125
+ ```
126
+
127
+
128
+
129
+ error logの一部
130
+
131
+ ```
132
+
133
+ develop.ERROR: PDOException: SQLSTATE[HY000] [2002] No such file or directory in /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68
134
+
135
+ Stack trace:
136
+
137
+ #0 /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(68): PDO->__construct('mysql:unix_sock...', 'root', 'root', Array)
138
+
139
+ #1 /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(44): Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:unix_sock...', 'root', 'root', Array)
140
+
141
+ #2 /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection('mysql:unix_sock...', Array, Array)
142
+
143
+ #3 /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(183): Illuminate\Database\Connectors\MySqlConnector->connect(Array)
144
+
145
+ #4 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
146
+
147
+ #5 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(883): call_user_func(Object(Closure))
148
+
149
+ #6 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(904): Illuminate\Database\Connection->getPdo()
150
+
151
+ #7 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(392): Illuminate\Database\Connection->getReadPdo()
152
+
153
+ ```
154
+
155
+
156
+
157
+ 何日も、何十時間やっても動かなくて、本当に何卒よろしくお願いします、、、