Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’ve an App of a Docker Laravel installation that communicate with two Vue.js apps via mySql database. When I call the query from the frontend apps I get in console the following error:
{"errors":[{"message":"Internal server error","extensions":{"category":"internal"},"locations":[{"line":2,"column":3}],"path":["clients"]}],"extensions":{"lighthouse_subscriptions":{"version":2,"channel":null}}}
Checking the laravel.log on the DigitalOcean App I see this error:
[2022-11-19 08:12:40] production.ERROR: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `user_type` like CLIENT) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `user_type` like CLIENT) at /workspace/vendor/laravel/framework/src/Illuminate/Database/Connection.php:759)
My App settings has the App Spec variables like that
- key: DB_DATABASE
scope: RUN_TIME
value: xxxxx
- key: DB_PORT
scope: RUN_TIME
value: "3306"
- key: DB_HOST
scope: RUN_TIME
value: 127.0.0.1
- key: DB_USERNAME
scope: RUN_TIME
value: xxxxxxx
- key: DB_PASSWORD
scope: RUN_TIME
value: xxxxxxx
on the Laravel side, the config/database.php
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'xxxxxx'),
'username' => env('DB_USERNAME', 'xxxxxx'),
'password' => env('DB_PASSWORD', 'xxxxxx'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
on the Vue.js side
const apolloClient = new ApolloClient({
link: ApolloLink.from([
pusherLink,
createUploadLink({
uri: 'DigitalOcenAppURI/graphql',
}),
]),
cache,
});
I wonder where is the problem. Maybe mysql is not installed on the DigitalOcean app??
Thank you for the help
hbarnard
keneucker
keneucker
rich
santoshpatil
Aspiresoftserv
Yakin
Thejaswini-Rao-U
775c69c916d345a7a367d867078ccb
mayricoak
ndam
bc2f52583874402a988f587c00195d