Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem after migrate from MariaDB 10.3 to 10.4 #9279

Closed
2 of 6 tasks
PVasileff opened this issue Dec 7, 2019 · 2 comments
Closed
2 of 6 tasks

Problem after migrate from MariaDB 10.3 to 10.4 #9279

PVasileff opened this issue Dec 7, 2019 · 2 comments

Comments

@PVasileff
Copy link

PVasileff commented Dec 7, 2019

  • Gitea version (or commit ref): 1.10.1
  • Git version: 2.20.1
  • Operating system: Debian 10
  • 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:

2019/12/07 11:13:44 routers/init.go:59:initDBEngine() [E] ORM engine initialization attempt #7/10 failed. Error: commands out of sync. Did you run multiple statements at once?
2019/12/07 11:13:44 routers/init.go:60:initDBEngine() [I] Backing off for 3 seconds
2019/12/07 11:13:47 routers/init.go:53:initDBEngine() [I] ORM engine initialization attempt #8/10...
2019/12/07 11:13:47 ...-xorm/xorm/engine.go:330:Ping() [I] PING DATABASE mysql
2019/12/07 11:13:47 routers/init.go:59:initDBEngine() [E] ORM engine initialization attempt #8/10 failed. Error: commands out of sync. Did you run multiple statements at once?
2019/12/07 11:13:47 routers/init.go:60:initDBEngine() [I] Backing off for 3 seconds

Description

I migrate my gitea from debian 10, mariadb 10.3 (from apt installed) from debian repo to
debian 10, mariadb 10.4 (from mariadb repository installed).

MySQL database has been dumped from 10.3 with:
mysqldump --single-transaction gitea > gitea.sql

Strict mode on new MariaDB 10.4 was disabled:
mysql -e 'select @@GLOBAL.sql_mode;'
+------------------------+
| @@GLOBAL.sql_mode |
+------------------------+
| NO_ENGINE_SUBSTITUTION |
+------------------------+

MySQL database name. user and password was correct.
Is there any ideas how to fix that ?
...

@PVasileff
Copy link
Author

Here is MariaDB 10.3 my.cnf configuration:

[server]

[mysqld]

user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
socket                  = /run/mysqld/mysqld.sock
port                    = 3306
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql

bind-address            = 127.0.0.1

sql-mode="NO_ENGINE_SUBSTITUTION"

key_buffer_size        = 16M
max_allowed_packet     = 16M
thread_stack           = 192K
thread_cache_size      = 8
myisam_recover_options = BACKUP

query_cache_limit       = 1M
query_cache_size        = 16M

log_error = /var/log/mysql.err
slow_query_log_file    = /var/log/mysql.slow
expire_logs_days        = 10
max_binlog_size         = 100M

innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1


character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci



[embedded]

[mariadb]

[mariadb-10.3]

Here is MariaDB 10.4 config file:

[client]
default-character-set = utf8mb4
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
log_error = /var/log/mysql/mysql-error.log
nice = 0
socket = /var/run/mysqld/mysqld.sock

[mysqld]
# Disable mysql strict mode
sql-mode="NO_ENGINE_SUBSTITUTION"
basedir = /usr
bind-address = 127.0.0.1
binlog_format = ROW
bulk_insert_buffer_size = 16M
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
concurrent_insert = 2
connect_timeout = 5
datadir = /var/lib/mysql
default_storage_engine = InnoDB
expire_logs_days = 10
general_log_file = /var/log/mysql/mysql.log
general_log = 0
innodb_buffer_pool_size = 1024M
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 4000
innodb_flush_method = O_DIRECT
# nextcloud tune
innodb_file_format=barracuda
innodb_large_prefix=true
key_buffer_size = 128M
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
#log_bin = /var/log/mysql/mysql-bin
#log_bin_index = /var/log/mysql/mysql-bin.index
log_error=/var/log/mysql/mysql.err
log_slow_verbosity = query_plan
log_warnings = 2
long_query_time = 1
max_allowed_packet = 16M
max_binlog_size = 100M
max_connections = 200
max_heap_table_size = 64M
myisam_recover_options = BACKUP
myisam_sort_buffer_size = 512M
port = 3306
pid-file = /var/run/mysqld/mysqld.pid
query_cache_limit = 2M
query_cache_size = 64M
query_cache_type = 1
query_cache_min_res_unit = 2k
read_buffer_size = 2M
read_rnd_buffer_size = 1M
skip-external-locking
skip-name-resolve
slow_query_log_file = /var/log/mysql/mysql.slow
slow-query-log = 1
socket = /var/run/mysqld/mysqld.sock
sort_buffer_size = 4M
table_open_cache = 400
thread_cache_size = 128
tmp_table_size = 64M
tmpdir = /tmp
transaction_isolation = READ-COMMITTED
user = mysql
wait_timeout = 600

[mysqldump]
max_allowed_packet = 16M
quick
quote-names

[isamchk]
key_buffer = 16M

@PVasileff
Copy link
Author

Problem solved after change:

HOST = localhost:3306

to:

HOST = /var/run/mysqld/mysqld.sock

in section

[database]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant