Error 1130 when launching a new docker instance #11855

Closed
opened 2025-11-02 09:49:48 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @mattdale77 on GitHub (Oct 15, 2023).

Description

I am new to Gitea but not to Linux or Docker. I followed the instructions to install from the Gitea page.

When launching I get the install page in a browser but I get the following error when hitting the "Install Gitea" button.

The database settings are invalid: Error 1130: Host '192.168.80.3' is not allowed to connect to this MariaDB server

There is someone else who has reported the same error with MySql on the forum page so it is not because I have switched to using MariaDB, which I believe is supported.

I am using the latest tag in docker which appears to be synonymous with 1.2.0 currently.
I am also using the latest tag for MariaDB which is 11.1.2 currently.

My docker-compose.yml is as follows:

`version: "3"

networks:
gitea:
external: false

services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=3000
- USER_GID=3000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=gitdb:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: unless-stopped
networks:
- gitea
volumes:
- /mnt/gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "5000:3000"
- "222:22"
depends_on:
- gitdb

gitdb:
image: mariadb:latest
container_name: gitdb
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- /mnt/gitea/db:/var/lib/mysql`

I believe if I shell into the MariaDB and update the permissions in the database it will work but I'm raising this as it should work out of the box and not need manual intervention

Gitea Version

1.2.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

N/A

Screenshots

The guy who raised this on the forum included a screenshot

https://forum.gitea.com/t/gitea-support-issue-error-1130/5503

Git Version

No response

Operating System

Ubuntu 22.04 - Docker

How are you running Gitea?

Docker, listing of the compose file in the main box

Database

MySQL/MariaDB

Originally created by @mattdale77 on GitHub (Oct 15, 2023). ### Description I am new to Gitea but not to Linux or Docker. I followed the instructions to install from the Gitea page. When launching I get the install page in a browser but I get the following error when hitting the "Install Gitea" button. `The database settings are invalid: Error 1130: Host '192.168.80.3' is not allowed to connect to this MariaDB server` There is someone else who has reported the same error with MySql on the forum page so it is not because I have switched to using MariaDB, which I believe is supported. I am using the latest tag in docker which appears to be synonymous with 1.2.0 currently. I am also using the latest tag for MariaDB which is 11.1.2 currently. My docker-compose.yml is as follows: `version: "3" networks: gitea: external: false services: gitea: image: gitea/gitea:latest container_name: gitea environment: - USER_UID=3000 - USER_GID=3000 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=gitdb:3306 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=gitea restart: unless-stopped networks: - gitea volumes: - /mnt/gitea/data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "5000:3000" - "222:22" depends_on: - gitdb gitdb: image: mariadb:latest container_name: gitdb restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=gitea - MYSQL_DATABASE=gitea networks: - gitea volumes: - /mnt/gitea/db:/var/lib/mysql` I believe if I shell into the MariaDB and update the permissions in the database it will work but I'm raising this as it should work out of the box and not need manual intervention ### Gitea Version 1.2.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist N/A ### Screenshots The guy who raised this on the forum included a screenshot https://forum.gitea.com/t/gitea-support-issue-error-1130/5503 ### Git Version _No response_ ### Operating System Ubuntu 22.04 - Docker ### How are you running Gitea? Docker, listing of the compose file in the main box ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 09:49:48 -06:00
Author
Owner

@mattdale77 commented on GitHub (Oct 16, 2023):

There is an error in the MariaDB log at this time

Aborted connection 5 to db: 'unconnected' user: 'unauthenticated' host: '192.168.112.3' (This connection closed normally without authentication)

@mattdale77 commented on GitHub (Oct 16, 2023): There is an error in the MariaDB log at this time Aborted connection 5 to db: 'unconnected' user: 'unauthenticated' host: '192.168.112.3' (This connection closed normally without authentication)
Author
Owner

@mattdale77 commented on GitHub (Oct 16, 2023):

Switching to mysql makes this work as expected so this must come down to a difference between the default configuration of MariaDB and MySQL

@mattdale77 commented on GitHub (Oct 16, 2023): Switching to mysql makes this work as expected so this must come down to a difference between the default configuration of MariaDB and MySQL
Author
Owner

@mattdale77 commented on GitHub (Oct 17, 2023):

This is a problem with the MariaDB docker image. It seems to ignore the environment variables set. It works fine if I create the user and database manually. No problem with gitea.

@mattdale77 commented on GitHub (Oct 17, 2023): This is a problem with the MariaDB docker image. It seems to ignore the environment variables set. It works fine if I create the user and database manually. No problem with gitea.
Author
Owner

@lng2020 commented on GitHub (Oct 18, 2023):

Thanks for your patient investigation.

No problem with gitea.

Glad to hear that 🥂

@lng2020 commented on GitHub (Oct 18, 2023): Thanks for your patient investigation. > No problem with gitea. Glad to hear that 🥂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11855