[E] Failed to initialize ORM engine: this user requires mysql native password authentication. #1748

Closed
opened 2025-11-02 04:12:06 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @brian9206 on GitHub (May 1, 2018).

  • Gitea version (or commit ref): 1.4
  • Git version:
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

MySQL version: 8.0

The server won't start up and the log shows the following error message:

[...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: this user requires mysql native password authentication.

This error is caused by the go-sql-driver/mysql.
It seems there is no way to set AllowNativePasswords in gitea config

Is there any workaround for this issue?

Originally created by @brian9206 on GitHub (May 1, 2018). - Gitea version (or commit ref): 1.4 - Git version: - Operating system: CentOS 7 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description MySQL version: 8.0 The server won't start up and the log shows the following error message: ``` [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: this user requires mysql native password authentication. ``` This error is caused by the [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql/blob/a8b7ed4454a6a4f98f85d3ad558cd6d97cec6959/errors.go#L24). It seems there is no way to set `AllowNativePasswords` in gitea config Is there any workaround for this issue?
GiteaMirror added the type/enhancement label 2025-11-02 04:12:06 -06:00
Author
Owner

@lunny commented on GitHub (May 2, 2018):

It seems gitea could add allowNativePasswords options on connstr to do that.

@lunny commented on GitHub (May 2, 2018): It seems gitea could add allowNativePasswords options on connstr to do that.
Author
Owner

@brian9206 commented on GitHub (May 2, 2018):

so there is no workaround for now? my server is down because of that at the moment

@brian9206 commented on GitHub (May 2, 2018): so there is no workaround for now? my server is down because of that at the moment
Author
Owner

@silverwind commented on GitHub (May 7, 2018):

there is no workaround for now?

See https://github.com/gogits/gogs/issues/5187#issuecomment-383271349

@silverwind commented on GitHub (May 7, 2018): > there is no workaround for now? See https://github.com/gogits/gogs/issues/5187#issuecomment-383271349
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1748