Closed andyyumiao closed 4 years ago
Yes, I am also getting same error on starting server.
Yes, I am also getting same error on starting server.
you may run 'go get' command before startup: go get github.com/astaxie/beego go get "github.com/astaxie/beego/plugins/cors" go get "github.com/casbin/casbin-dashboard/object" go get "github.com/casbin/casbin-dashboard/routers"
@andyyumiao please setup your DB connection string: https://github.com/casbin/casbin-dashboard#installation
@hsluoyz I am getting the same error after following the above-mentioned steps.
Logs -
panic: dial tcp 127.0.0.1:3306: connect: connection refused
goroutine 1 [running]:
github.com/casbin/casbin-dashboard/object.(*OrmManager).open(0xc00022d5f0)
/home/arteev/casbin-dashboard/object/orm_manager.go:60 +0x131
github.com/casbin/casbin-dashboard/object.NewOrmManager(0xc761a6, 0x5, 0xc0000db000, 0x1d, 0x1d)
/home/arteev/casbin-dashboard/object/orm_manager.go:39 +0x7d
github.com/casbin/casbin-dashboard/object.InitOrmManager()
/home/arteev/casbin-dashboard/object/orm_manager.go:14 +0x73
main.main()
/home/arteev/casbin-dashboard/main.go:13 +0x26
exit status 2
Are there any other workarounds?
@andyyumiao Were you able to fix this?
Did you have installed a DB like MySQL at: 127.0.0.1:3306 ?
Did you have installed a DB like MySQL at: 127.0.0.1:3306 ?
Sorry for late reply. Yes, It was the error in the first place but after installing MySQL. I am getting a different kind of error on running the command go run main.go
Logs -
panic: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)
goroutine 1 [running]:
github.com/casbin/casbin-dashboard/object.(*OrmManager).open(0xc00017b530)
/home/arteev/casbin-dashboard/object/orm_manager.go:60 +0x131
github.com/casbin/casbin-dashboard/object.NewOrmManager(0xc761a6, 0x5, 0xc0000daf20, 0x1d, 0x1d)
/home/arteev/casbin-dashboard/object/orm_manager.go:39 +0x7d
github.com/casbin/casbin-dashboard/object.InitOrmManager()
/home/arteev/casbin-dashboard/object/orm_manager.go:14 +0x73
main.main()
/home/arteev/casbin-dashboard/main.go:13 +0x26
exit status 2
I am only able to see the header and footer in React Client.
I think this may be due to backend not correctly setup. Your views @hsluoyz ?
panic: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)
Clearly, your DB password is wrong.
@hsluoyz I just configured the DB using a new password. But when I run the command go run main.go
it does not prompt to enter the db password. Do I need to hardcode it somewhere in the code itself ?
https://github.com/casbin/casbin-dashboard#installation
dataSourceName = root:123@tcp(localhost:3306)/
Replace 123
with your password.
https://github.com/casbin/casbin-dashboard#installation
dataSourceName = root:123@tcp(localhost:3306)/
Replace
123
with your password.
Thanks a bunch! It helped.
rubbish, get out of GitHub!!!
panic: dial tcp 127.0.0.1:3306: connect: connection refused
goroutine 1 [running]: github.com/casbin/casbin-dashboard/object.(*OrmManager).open(0xc0001a86c0) /Users/yumiao3/workspace/github/casbin-dashboard/object/orm_manager.go:60 +0x133 github.com/casbin/casbin-dashboard/object.NewOrmManager(0x173bce1, 0x5, 0xc0000cc380, 0x1e, 0x1e) /Users/yumiao3/workspace/github/casbin-dashboard/object/orm_manager.go:39 +0x7d github.com/casbin/casbin-dashboard/object.InitOrmManager() /Users/yumiao3/workspace/github/casbin-dashboard/object/orm_manager.go:14 +0x73 main.main() /Users/yumiao3/workspace/github/casbin-dashboard/main.go:13 +0x26