Проблема была решена таким способом:
Download the mysql-apt-conf tool from
dev.mysql.com/downloads/repo/apt
Install the package using sudo dpkg -i /PATH/version-specific-package-name.deb
When installing select MySQL Server & Cluster to whatever you want by pressing enter and selecting one of mysql-5.7 or mysql-8.0 then go to Ok and press enter
Run sudo apt install mysql-server
After the main packages are installed run sudo mysql_secure_installation, this will configure the password and other security stuff for mysql