yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
237 stars 71 forks source link

mysql_upgrade is missing #23

Closed BudBundi closed 5 years ago

BudBundi commented 5 years ago

After upgrading the container, I get the error: 2019-02-11 18:19:57 0 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALU and 2019-02-11 18:26:02 11 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade

But the container is missing the mysql_upgrade tool, I have tried to run mysqlcheck -u root -p'pw' --check-upgrade --auto-repair --all-databases but the problem persists.

dominictayloruk commented 5 years ago

This has been missing for a couple of versions now. I've checked the Mariadb package contents and it seems mysql_upgrade has been omitted.

https://pkgs.alpinelinux.org/contents?branch=v3.9&name=mariadb&arch=x86_64&repo=main

dominictayloruk commented 5 years ago

Only solution to update is to backup, re create, restore.

I might have to manually add the mysql_upgrade file.

waldner commented 5 years ago

It looks like it's been moved to the mariadb-server-utils package (https://pkgs.alpinelinux.org/package/v3.9/main/x86_64/mariadb-server-utils). Any plans for an updated build?

waldner commented 5 years ago

But the container is missing the mysql_upgrade tool, I have tried to run mysqlcheck -u root -p'BudBundi666!!!' --check-upgrade --auto-repair --all-databases but the problem persists.

@BudBundi you can of course apk add mariadb-server-utils in the container, then run mysql_upgrade

dominictayloruk commented 5 years ago

Thanks @waldner Just what the doctor ordered.