Page tree
Skip to end of metadata
Go to start of metadata

Gogs requires a database to work. This chapter describes how to set MySQL Community Server 5.5.53 up, so it would maintain Gogs.

1.1 Download MySQL

Download MySQL Community Server 5.5.53. Download the executable file and launch, or if you have downloaded an archived version, unpack it and then launch the executable file.

1.2 Install MySQL

Run the executable file and proceed installation until the installation program asks you to chose a setup type:

MySQL setup type

Press the “Typical” button and continue with the installation until you will see a window reporting successful installation:

MySQL setup complete

Make sure that the box “Launch the MySQL Instance Configuration Wizard” is checked and press “Finish”.

1.3 Configure MySQL

After pressing the “Finish” button, Configuration Wizard will pop up. Press the “Next” button:

MySQL server chose

Chose the server you just installed and then the “Next” button:

MySQL configuration option chose

Chose “Standard Configuration” and then “Next” button yet again:

MySQL windows option setup

Make sure that you have checked the box “Include Bin Directory in Windows Path” at this step and then press the “Next” button.

MySQL security options

Uncheck “Modify Security Settings” box (Do not worry, the custom password will be set later) and proceed in the Configuration Wizard until you hit the “Finish” button.

MySQL configuration finish

1.4 Setup the database

Run command line (cmd) and enter the line: mysql -u root –password=root

MySQL cmd login

You will be connected to MySQL Monitor. To change the password write the following line:

$ SET PASSWORD FOR 'root'@'localhost' = PASSWORD('custompassword');

Where ‘custompassword’ is the password that you chose.

MySQL cmd password setup

Enter the line:

$ show databases;

(Make sure you have put semicolon(;) at the end of the line) to see the list of databases.

MySQL cmd show databases

Create a database for Gogs with the line:

$ create database gogs;

MySQL cmd create database

To check if the database was created write the line

$ show databases


MySQL cmd check database

If “gogs” database is present in the list, you are good to go. Enter “exit” and close the cmd.

  • No labels