NekoWheel / NekoBox

📫 匿名提问箱 / Anonymous question box
https://box.n3ko.cc
MIT License
209 stars 28 forks source link

MySQL #8

Closed mohu258 closed 3 years ago

mohu258 commented 3 years ago

请问这个项目是否用到MySQL

wuhan005 commented 3 years ago

嗯 用到了 https://github.com/NekoWheel/NekoBox/blob/master/models/models.go#L25-L31

mohu258 commented 3 years ago

运行build出来的NekoBox文件提升Error 1045: Access denied for user ''@'localhost' (using password: NO) 求解

wuhan005 commented 3 years ago

配置文件怎么写的?

mohu258 commented 3 years ago

appname = nekobox httpport = 8080 runmode = prod

title = "NekoBox" icp = "139.180.203.153" salt = ""

enablexsrf = true xsrfkey = "" xsrfexpire = 3600

recaptcha_domain = "https://www.recaptcha.net" recaptcha_site_key = "" recaptcha_server_key = ""

upload_token = "" upload_url = "" default_avatar = "" default_background = ""

db_user = "123" db_password = "a12345" db_addr = "tcp(localhost:3306)" db_name = "123"

wuhan005 commented 3 years ago

嗯,看配置文件没有问题。配置文件是放置在 ./conf/app.conf 下面吗?

mohu258 commented 3 years ago

是的, 应该是我的MySQL出了问题