Comments (8)
我们看一下
from go-pangu.
这里的 test_user 应该是用户名
你在命令行可以使用
sudo -i -u test_user 切换到此用户
psql 进入数据库
来验证是否正常
from go-pangu.
这里的 test_user 应该是用户名
你在命令行可以使用sudo -i -u test_user 切换到此用户
psql 进入数据库来验证是否正常
test_user 是用户名,但运行后把这个读成了数据库名了 -----------致命错误: 数据库 "test_user" 不存在 (SQLSTATE 3D000))
from go-pangu.
这里的 test_user 应该是用户名
你在命令行可以使用
sudo -i -u test_user 切换到此用户
psql 进入数据库
来验证是否正常test_user 是用户名,但运行后把这个读成了数据库名了 -----------致命错误: 数据库 "test_user" 不存在 (SQLSTATE 3D000))
你好 请问你是否运行过 go run main.go -db=create 这个命令来创建数据库
from go-pangu.
可以把application.yml全部复制过来吗
from go-pangu.
就是 go run main.go -db=create的时候报的错,配置如下,就改了PG的用户名密码
DEVISE_JWT_SECRET_KEY: RANDOM_SECRET
HTTP_PORT: 3002
BASE_DATABASE_URL: postgres://test_user:123456@localhost:5432
DATABASE_URL: postgres://test_user:123456@localhost:5432/go_pangu_development?sslmode=disable
DATABASE_TESTURL: postgres://test_user:123456@localhost:5432/go_pangu_test?sslmode=disable
REDIS_URL: redis://:123456@localhost:6379/7
WORKERS: CollectIpWorker,QcloudSmsWorker
SMS_APPID:
SMS_APPKEY:
SMS_TEMPID:
SMS_APPLYTEMPID:
ALIPAY_APP_ID:
ALIPAY_PRIVATE_KEY:
ALIPAY_PUBLIC_KEY:
ALIPAY_URL:
INFLUXDB_DB: go_pangu
INFLUXDB_HOST: localhost
INFLUXDB_PORT: '8086'
from go-pangu.
就是 go run main.go -db=create的时候报的错,配置如下,就改了PG的用户名密码
DEVISE_JWT_SECRET_KEY: RANDOM_SECRET
HTTP_PORT: 3002
BASE_DATABASE_URL: postgres://test_user:123456@localhost:5432
DATABASE_URL: postgres://test_user:123456@localhost:5432/go_pangu_development?sslmode=disable
DATABASE_TESTURL: postgres://test_user:123456@localhost:5432/go_pangu_test?sslmode=disable
REDIS_URL: redis://:123456@localhost:6379/7
WORKERS: CollectIpWorker,QcloudSmsWorker
SMS_APPID:
SMS_APPKEY:
SMS_TEMPID:
SMS_APPLYTEMPID:
ALIPAY_APP_ID:
ALIPAY_PRIVATE_KEY:
ALIPAY_PUBLIC_KEY:
ALIPAY_URL:
INFLUXDB_DB: go_pangu
INFLUXDB_HOST: localhost
INFLUXDB_PORT: '8086'
查清楚了 是数据库用户问题
先用postgres用户进入数据库
sudo -i -u postgres
psql
接着创建test_user用户
CREATE USER test_user WITH PASSWORD '123456' superuser;
接着创建一个test_user的数据库
create database test_user;
注:
配置里的DATABASE_TESTURL 使用的go_pangu_test暂时不能修改
运行go run main.go -db=create
进入test文件夹 运行 ginkgo 看是否全部测试成功
from go-pangu.
我直接使用postgres,不使用test_user试了下好了。但我之前用过postgres用户试过也不行,不知道为啥现在又好了。
先这样了,谢谢了
from go-pangu.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-pangu.