gogs: Cannot recognize MySQL password correctly when contains ';'
Hello,
I seem to be running into an issue when trying to upgrade from Gogs version 0.7.22 to any newer version (I’ve tried 0.7.33, 0.8 and 0.8.25). The machine is a Centos 6 box with MySQL 5.1.69 and Git version 1.8.3.1
2016/02/12 15:28:09 [T] Custom path: /asc/array1/gogs/gogs/custom
2016/02/12 15:28:09 [T] Log path: /asc/array1/gogs/gogs/log
2016/02/12 15:28:09 [I] Gogs: Go Git Service 0.8.25.0129
2016/02/12 15:28:09 [I] Log Mode: File(Info)
2016/02/12 15:28:09 [I] Cache Service Enabled
2016/02/12 15:28:09 [I] Session Service Enabled
2016/02/12 15:28:09 [I] Git Version: 1.8.3.1
2016/02/12 15:28:09 [...s/routers/install.go:70 GlobalInit()] [E] Fail to initialize ORM engine: migrate: sync: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)
The mysql password hasn’t changed (and I can log into mysql with the password fine), but everytime I try to upgrade I get this access denied error. When reverting back to 0.7.22 (without changing anything in the app.ini) it works fine. Could something have changed between 0.7.22 and above for gogs or xorm that could be causing this?
I took a look at issue #385 about old mysql passwords, and while our password didn’t match that case I wen’t ahead with the solution anyways and it didn’t fix it.
I also noticed this on the Troubleshooting page in the comments, not sure if its related, but there was no answer
Unfortunately when I enabled general logging for our mysql server I still couldn’t see any issue. Finally I decided to ditch mysql for sqlite (should have done this to begin with) using some tools to dump the mysql database into a sqlite3 one and point gogs at that instead
[database]
;DB_TYPE = mysql
;HOST = 127.0.0.1:3306
;NAME = gogs
;USER = root
;PASSWD = **********
;SSL_MODE = disable
DB_TYPE = sqlite3
PATH = data/gogs.db
but when I do that I get this
2016/02/12 13:04:16 [T] Custom path: /asc/array1/gogs/gogs/custom 2016/02/12 13:04:16 [T] Log path: /asc/array1/gogs/gogs/log 2016/02/12 13:04:16 [I] Gogs: Go Git Service 0.8.25.0129 2016/02/12 13:04:16 [I] Log Mode: File(Info) 2016/02/12 13:04:16 [I] Cache Service Enabled 2016/02/12 13:04:16 [I] Session Service Enabled 2016/02/12 13:04:16 [I] Git Version: 1.8.3.1 2016/02/12 13:04:16 [...s/routers/install.go:70 GlobalInit()] [E] Fail to initialize ORM engine: migrate: sync: duplicate column name: id
Anyways, hope we can figure this out, Gogs has been awesome so far and while I don’t care so much about mysql vs sqlite3, it is important I can upgrade without losing my data 😄 thank you
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 38 (18 by maintainers)
Docs were updated and I confirmed the INI package correctly quotes illegal characters during install. I think this is safe to close.
@IaBurton thanks for your support along the way, hope upgrade is smooth except this password problem :trollface: