Upgrade MariaDB

vahid07

Verified User
Joined
Apr 16, 2018
Messages
22
Hi,

im using mariaDB ver 10.2 . how can i upgrade it to ver 10.4? and is this upgrade free risk and useful?
 
also it will not give incredible speed just with mysql upgrade, but it will give a lot of fresh useful features
 
cd /usr/local/directadmin/custombuild
./build set mariadb 5.6
./build set mysql_inst mariadb
./build set mysql_backup yes
./build update
./build mariadb

This also take backup, where this backup stored, is this avalaible for life time or get deleted after upgrade.Please explain.
 
where this backup stored, is this avalaible for life time or get deleted after upgrade.Please explain.
It's stored at /usr/local/mysql_backups and if I'm not mistaken it's overwritten on the next mysql upgrade, however you can easily copy it to another directory before upgrading.
 
What if some thing happen wrong after upgrade and want to revert back to previous version with all previous data what steps and command should I use
 
Read in this

You need upgrade from version to version
eg. from 10.2 to 10.3 then 10.3 to 10.4
for safe please backup database before do this.

Hi,

Thank you for answer

i set mariadb to 10.3 and run update from custombuild plugin. after precess it show this messages at end:

Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
Giving mysqld a few seconds to start up...
Error: Server version (10.2.31-MariaDB) does not match with the version of
the server (10.3.22-MariaDB) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
FATAL ERROR: Upgrade failed
cp: '/usr/lib/libmysqlclient.so' and '/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
Installation completed.

and result for systemctl status mariadb.service:

[root@da custombuild]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/etc/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Mon 2020-04-13 17:11:46 +0430; 3min 29s ago
Process: 8393 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 8346 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 8344 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 8393 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
CGroup: /system.slice/mariadb.service
└─21122 /usr/sbin/mysqld --basedir=/usr

Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [Note] InnoDB: Starting shutdown...
Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [ERROR] Plugin 'InnoDB' init function returned error.
Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Apr 13 17:11:46 da.domain.org mysqld[8393]: 2020-04-13 17:11:46 0 [ERROR] Aborting
Apr 13 17:11:46 da.domain.org systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Apr 13 17:11:46 da.domain.org systemd[1]: Failed to start MariaDB database server.
Apr 13 17:11:46 da.domain.org systemd[1]: Unit mariadb.service entered failed state.
Apr 13 17:11:46 da.domain.org systemd[1]: mariadb.service failed.

at this time my site are up and mysql -v show:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 106457
Server version: 10.2.31-MariaDB MariaDB Server

whats the problem for upgrade?
 
Hi,

Thank you for answer

i set mariadb to 10.3 and run update from custombuild plugin. after precess it show this messages at end:



and result for systemctl status mariadb.service:



at this time my site are up and mysql -v show:



whats the problem for upgrade?

i changed custom build configuration again to mariadb 10.2, restart server and then upgrade it to 10.3 without error:

Updating / installing...
MariaDB-compat-10.3.22-1.el7.centos ########################################
MariaDB-common-10.3.22-1.el7.centos ########################################
MariaDB-client-10.3.22-1.el7.centos ########################################
MariaDB-server-10.3.22-1.el7.centos ########################################
MariaDB-devel-10.3.22-1.el7.centos ########################################
MariaDB-shared-10.3.22-1.el7.centos ########################################
MariaDB-backup-10.3.22-1.el7.centos ########################################
Created symlink from /etc/systemd/system/mysql.service to /etc/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /etc/systemd/system/mariadb.service.
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
This installation of MySQL is already upgraded to 10.3.22-MariaDB, use --force if you still need to run mysql_upgrade
cp: '/usr/lib/libmysqlclient.so' and '/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
Installation completed.
Done!

im going for 10.4 soon ;):cool:
 
Back
Top