Recreating Gogs MySQL-User



can someone give me the statement used to create the MySQL-User for gogs with correct permissions? Or a link to the install script that does it so i can run it manually. I reinstalled mysql because my mysql.user table was broken.

Gogs version
mysql Ver 14.14 Distrib 5.5.61, for debian-linux-gnu (x86_64) using readline 6.3

Thanks in advance


… if you lost your MySQL data and no backup, it is permanent and no way to recover.


Nah, I have the data. I dropped the mysql.user table which contained a user gogs with my set password. I just want the permissions for the CREATE USER statement. Can you help me on that?


turn out all documentation uses root mysql user. Seems like I created one by myself.