How can I setup database config on local environment?


#1

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.


#2

MySQL is a good choice.


#3

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


#4

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


#5

Google your error. You have wrong password.


#6

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


#7

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.


#8

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.


#9

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