easychen / pushdeer

开放源码的无App推送服务,iOS14+扫码即用。亦支持快应用/iOS和Mac客户端、Android客户端、自制设备
Other
4.57k stars 467 forks source link

自建服务docker部署报错:SQLSTATE[HY000] [2002] Connection refused #135

Closed qiaoyukeji closed 2 years ago

qiaoyukeji commented 2 years ago

我报这个错,docker中数据库的端口改成了3316,然后就报错了, 使用的是 http://www.pushdeer.com/selfhosted.html 中描述的 docker 自己架设服务器的流程,修改了 docker-compose.self-hosted.yml 中的数据库端口号,然后就报这个错了

app_1      | Package manifest generated successfully.
app_1      | 77 packages you are using are looking for funding.
app_1      | Use the `composer fund` command to find out more!
app_1      | Application key set successfully.
app_1      | 
app_1      |    Illuminate\Database\QueryException 
app_1      | 
app_1      |   SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = pushdeer and table_name = migrations and table_type = 'BASE TABLE')
app_1      | 
app_1      |   at vendor/laravel/framework/src/Illuminate/Database/Connection.php:705
app_1      |     701▕         // If an exception occurs when attempting to run a query, we'll format the error
app_1      |     702▕         // message to include the bindings with SQL, which will make this exception a
app_1      |     703▕         // lot more helpful to the developer instead of just the database's errors.
app_1      |     704▕         catch (Exception $e) {
app_1      |   ➜ 705▕             throw new QueryException(
app_1      |     706▕                 $query, $this->prepareBindings($bindings), $e
app_1      |     707▕             );
app_1      |     708▕         }
app_1      |     709▕     }
app_1      | 
easychen commented 2 years ago

所有数据库端口相关的参数都要同步改。只改一个地方会连不上,也就报这个错。

qiaoyukeji commented 2 years ago

所有数据库端口相关的参数都要同步改。只改一个地方会连不上,也就报这个错。

所有的地方都该了,依旧报错;并且使用https://github.com/easychen/pushdeer/blob/main/doc/%E5%AE%89%E8%A3%85%E6%96%87%E6%A1%A3.md 文档中写明的独立出 mysql来 部署,依旧报相同的错

developer-wlj commented 2 years ago

老哥,我也是改了数据库的端口,报着个错误,你是怎么解决的

qiaoyukeji commented 2 years ago

老哥,我也是改了数据库的端口,报了个错误,你是怎么解决的

我现在没用这个了,当时好像没有使用docker部署的数据库转而使用其他数据库就不报错了,