I will try to update my MariaDB from 5.5.56-MariaDB to 10.3.9-MariaDB. However my current version was configured or located into another directory. How should i do it?
take a backup. either a) a copy of the datadir, or b) a sql dump (preferably both)
install the mariadb-10.3 packages
Normally only a single major upgrade is supported like 5.5 -> 10.0 -> 10.1 -> 10.2 -> 10.3 is supported however you may as well try and having your backup ready, you can install the datadir back.
Run mysql_upgrade after the upgrade.
Or, clear the datadir, run
mysql_install_db -u mysql and then load the new version with the mysqldump.
Test on a test server, if downtime or potentially incompatibly is an issue.