pglombardo / PasswordPusher

๐Ÿ” Securely share sensitive information with automatic expiration & deletion after a set number of views or duration. Track who, what and when with full audit logs.
https://pwpush.com
Apache License 2.0
1.79k stars 329 forks source link

mysql errors #2242

Closed matdemb closed 2 weeks ago

matdemb commented 3 weeks ago

๐Ÿ› Bug Report

We have some errors in mysql logs for our container pwpusher-1.40.15 (mariadb-pwpusher-10.11.7). We had an issue with the url publication that didn't works (error 500) But I don't know if there is a link with this errors.

2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'). 2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255). 2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'). 2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255). 2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'). 2024-06-11 9:13:54 8 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).

github-actions[bot] commented 3 weeks ago

Hello @matdemb, thanks for contributing to the Password Pusher community! We will respond as soon as possible.

pglombardo commented 3 weeks ago

Hi @matdemb - I have never seen those errors before but a bit of searching brought me to this:

https://bytefreaks.net/applications/docker/incorrect-definition-of-table-mysql-column_stats-expected-column

It seems you might have had a prior MariaDB running in that volume potentially? You may have to run mysql_upgrade as that article states.

pglombardo commented 3 weeks ago

HI @matdemb - have you had a chance to try this out yet? This seems to be a MariaDB upgrade issue.

matdemb commented 3 weeks ago

Hi, I didn't tryied yet. I will next week. I'll inform you of the result.

matdemb commented 2 weeks ago

Hi, I tried the proposed method but the mysql_upgrade wasn't find (and I didn't found it neither). I tried adding "MARIADB_AUTO_UPGRADE: 1" in the environnement variable of the container (+stop/start) and it seems ok now, no more error since the modification.

pglombardo commented 2 weeks ago

Excellent @matdemb - I'll close this out then. If anything else, feel free to post here or open another issue.