Can I upgrade Maria DB to 11.4 Ubuntu 22.4 like this?

Hello everyone, can I update Maria DB to 11.04 this way

  1. I copy the Maria DB config my.cnf
  2. Add to /etc/apt/sources.list.d/mariadb.list I comment on 10.4
deb [arch=amd64 signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/11.7/repo/ubuntu jammy main

I add a key in the terminal

sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'

I update, and the new version is installed immediately

sudo apt update -y && sudo apt upgrade -y

Removed the symbolic link to my.cnf and I put the config back in its place. Thank you

Instead, you can do the following, which has worked for me without exceptions:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash

Thank you, as testing showed, there is no need to add the key), he’s already there