I am installing Magento 2.4 on Vagrant through command line
here is the error I got
Current version of RDBMS is not supported. Used Version: 10.5.8-MariaDB-1:10.5.8+maria~bionic. Supported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4)
and here is the configurations at my Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: realityla.io
to: /home/vagrant/code/realityla
- map: lhm.bb
to: /home/vagrant/code/lhm
- map: magento.ee
to: /home/vagrant/code/magento
databases:
- homestead
features:
- mysql: true
- mariadb: true
- postgresql: false
- ohmyzsh: false
- webdriver: false
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
How can I change the Mysql or MariaDB version for only my Magento Website
3
Answers
And here is how I found the solution, thanks,
You Can modify the file: vendor/magento/framework/Test/Unit/DB/Adapter/SqlVersionProviderTest.php (Approximately Line 109 and add the MariaDB 10.5 Version to the Array:
'MariaDB-10.5' => [ ['version' => '10.5.8-MariaDB-1:10.5.8+maria~bionic'], '10.5.' ], and update the file: app/etc/di.xml (approximately Line 1818):
^10.[2-5]. from:
^10.[2-4]. Now I will note, it is NOT advisable to mode core files, however if you want it to run on MariaDB 10.5, that's how you can tackle it.
OR
PHP Version 7.4.27
nginx/1.21.5
Server version: 10.6.4-MariaDB – Homebrew
macOS Catalina Version 10.15.7 (19H1615)
Magento Open Source 2.4.3-p1.zip
Solution
nano vendor/magento/framework/Test/Unit/DB/Adapter/SqlVersionProviderTest.php
add above line in in public function executeDataProvider(): Final function will be like this
nano app/etc/di.xml
Line no 1856 line will be something like this
Change it like bellow