From 540072fa39433a7352789fa5bee27aa6f44c75d7 Mon Sep 17 00:00:00 2001 From: b-nagaj Date: Tue, 25 Feb 2025 19:39:31 +0000 Subject: [PATCH] FIX: DB Prep Docs - Step #1 (#173) ## Description Fix step 1 of the [Database Preparation](https://docs.gitea.com/installation/database-prep) docs. ## Changes When a user modifies the */etc/mysql/my.cnf* config file as instructed in step 1 of the database preparation guide, they get an error message from MySQL when trying to log in as the root user after saving changes. ```shell mysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 37. mysql: [ERROR] Fatal error in defaults handling. Program aborted! ``` The solution is to include precede `bind-address` with a group like this. ```ini [mysqld] bind-address = 203.0.113.3 ``` Reviewed-on: https://gitea.com/gitea/docs/pulls/173 Reviewed-by: Lunny Xiao Co-authored-by: b-nagaj Co-committed-by: b-nagaj --- docs/installation/database-preparation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/installation/database-preparation.md b/docs/installation/database-preparation.md index 25af91fc..6ce9c6b3 100644 --- a/docs/installation/database-preparation.md +++ b/docs/installation/database-preparation.md @@ -24,9 +24,10 @@ All steps below requires that the database engine of your choice is installed on ## MySQL/MariaDB -1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to: +1. For remote database setup, you will need to make MySQL listen to your IP address. Configure the `bind-address` option in `/etc/mysql/my.cnf` on database instance by adding the following lines: ```ini + [mysqld] bind-address = 203.0.113.3 ```