Upgrade 10.4.17-MariaDB issue

Bugs in eFa 4
Post Reply
henk
Posts: 502
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Upgrade 10.4.17-MariaDB issue

Post by henk »

Just (14-7-2022) updated efa (eFa.noarch 1:4.0.4-39.eFa.el7) , including the MariaDb mariadb104 upgrade on CentOs7

Found 3 issues.

1. Ignored this Error

Code: Select all

  Installing : 1:eFa-4.0.4-39.eFa.el7.noarch                                                                                                                                    23/61
Preparing to update eFa...
checkmodule:  loading policy configuration from /var/eFa/lib/selinux/eFa.te
checkmodule:  policy configuration loaded
checkmodule:  writing binary representation (version 19) to /var/eFa/lib/selinux/eFa.mod
ERROR 1292 (22007) at line 46: Incorrect datetime value: '1970-01-01 00:00:01' for column ``.``.`lastsent` at row 1
2.Mysql not running

Code: Select all

[root@sansspam mariadb]# mysql -V
mysql  Ver 15.1 Distrib 10.4.17-MariaDB, for Linux (x86_64) using readline 5.1

Code: Select all

systemctl status mariadb

Code: Select all

● mariadb.service - MariaDB 10.4 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─limit.conf, override.conf
   Active: inactive (dead) since Thu 2022-07-14 14:43:26 CEST; 6min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 21356 (code=exited, status=0/SUCCESS)
   Status: "MariaDB server is down"

Jul 14 14:42:49 sansspam.private.lan mysqld[21356]: 2022-07-14 14:42:49 0 [Note] /usr/libexec/mysqld (mysqld 10.4.17-MariaDB) starting as process 21356 ...
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: The datadir located at /var/lib/mysql needs to be upgraded using 'mysql_upgrade' tool. This can be done u...ng steps:
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: 1. Back-up your data before with 'mysql_upgrade'
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: 2. Start the database daemon using 'service mariadb start'
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: 3. Run 'mysql_upgrade' with a database user that has sufficient privileges
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: Read more about 'mysql_upgrade' usage at:
Jul 14 14:42:51 sansspam.private.lan mysql-check-upgrade[21964]: https://mariadb.com/kb/en/mariadb/documentation/sql-commands/table-commands/mysql_upgrade/
Jul 14 14:42:51 sansspam.private.lan systemd[1]: Started MariaDB 10.4 database server.
Jul 14 14:43:24 sansspam.private.lan systemd[1]: Stopping MariaDB 10.4 database server...
Jul 14 14:43:26 sansspam.private.lan systemd[1]: Stopped MariaDB 10.4 database server.
Hint: Some lines were ellipsized, use -l to show in full.
Steps to solve.

1 Run mysql Upgrade

Code: Select all

systemctl start mariadb
mysql_upgrade --verbose
When looking in

Code: Select all

/var/log/mariadb/mariadb.log
It looks like the last part of the string is truncated

Code: Select all

2022-07-14 14:42:50 0 [Warning] 'proxies_priv' entry '@% root@sansspam' ignored in --skip-name-resolve mode.
2022-07-14 14:42:50 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
2022-07-14 14:42:50 0 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
2022-07-14 14:42:50 0 [Note] Reading of all Master_info entries succeeded
2022-07-14 14:42:50 0 [Note] Added new Master_info '' to hash table

Checked the mysql.event table, column 'sql_mode'

Code: Select all

MariaDB [(none)]> DESCRIBE mysql.event;

| sql_mode             | 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','TIME_ROUND_FRACTIONAL') | NO   |     |                     | 

3. MailScanner Milter errors- Still need to hav a closer look as the dirs mentioned are not present

Code: Select all

/var/log/maillog

Code: Select all

Jul 14 15:50:39 sansspam MailScanner[3890]: Cannot open /var/spool/MailScanner/milterout/temp-3957-4LkG8B4Fpvz4xNP0 for relaying, will try again later
Jul 14 15:50:39 sansspam MailScanner[3890]: Cannot open /var/spool/MailScanner/milterout/temp-4077-4LkG8H5y5vz4xNP0 for relaying, will try again later
Jul 14 15:50:39 sansspam MailScanner[3957]: Cannot open /var/spool/MailScanner/milterout/temp-4077-4LkG8H5y5vz4xNP0 for relaying, will try again later
Jul 14 15:50:39 sansspam MailScanner[3957]: Cannot open /var/spool/MailScanner/milterout/4LkG8J75ZQz4xNP0 for relaying, will try again later

Code: Select all

ls -la
total 4
drwxr-xr-x.  9 root    root      129 Nov 15  2019 .
drwxr-xr-x. 17 root    root      226 Dec 13  2020 ..
drwxrwxr-x.  2 root    mtagroup    6 Jul  3 20:15 archive
drwxrwx---   9 root    mtagroup  220 Jul 14 15:50 incoming
drwxrwxr-x.  2 postfix postfix     6 Jul 14 15:50 milterin
drwxrwxr-x.  2 postfix postfix     6 Jul 14 15:50 milterout
drwxrwxr-x. 32 postfix mtagroup 4096 Jul  3 20:15 quarantine
drwxrwx---.  5 root    mtagroup  112 Jul 14 15:46 ramdisk_store
drwxr-xr-x.  2 postfix mtagroup   42 Jan 27  2020 spamassassin
Will hav a look at viewtopic.php?t=4753
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
User avatar
shawniverson
Posts: 3589
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Upgrade 10.4.17-MariaDB issue

Post by shawniverson »

Did you work through these issues or need more assistance?
henk
Posts: 502
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Upgrade 10.4.17-MariaDB issue

Post by henk »

No, all seems to work fine. Doing nothing solved nr 3 :-)

However I did enable mariadb ( systemctl enable mariadb) to make sure mariadb stops nicely when you perform a shutdown )

As I did another Mariadb upgrade on another, non efa, system ( from 10.1 -> 10.2) the same error occured during the upgrade process ....

"[ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at ....."
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
Post Reply