How can I setup database config on local environment?


Now I’m trying to setup GOGS on my local environment (MacOS).

What is the best way to setup database setting up on local environment?

I already installed Mysql via homebrew.


MySQL is a good choice.


My question is, when launching gogs in the local environment, what kind of mysql setting should be the form of the image above.


What should I write in Host, User, Database Name :sweat:


Google your error. You have wrong password.


Is thers any official docs for setting up Mysql for GOGS?


I don’t think there is because it is absolutely no different from any standard procedures: create a database, then connect with your username and password.


You can follow any standard tutorial for creating a MySQL database for a web app. Generally you’d create a user specific to your “application” (in this case Gogs) and a schema (database) which that user has moderately high privileges for (insert, update, delete, etc.). Then you’d provide that user, credentials, and database to your application (i.e. the screenshot you reference).

Gogs (or whatever application generally) would then use the credentials to create the various tables, procedures, etc. it requires within that schema.


I can create database and connect to gogs on local environment!! thank you so much for your help!! @esayre-um @Unknwon