Package Mysql Server Has No installation Candidate (Resolved)

Here are the steps you can follow to fix the error "package mysql-server has no installation candidate":

  1. Make sure you have the universe repository enabled. This repository contains a wide variety of open-source software packages, including MySQL. To enable the universe repository, run the following command:

sudo add-apt-repository universe

2. Update the package list by running the following command:

sudo apt update

3. If the error persists, it is possible that the package is not available in the      repository you are using. To check which repository the package is available in,  you can run the following command:

apt-cache policy mysql-server

This will show you a list of repositories and their corresponding versions of the package.

4. If the package is not available in the repository you are using, you can try adding a different repository that has the package. For example, if you are using the default Ubuntu repositories, you can try adding the MySQL APT repository by running the following commands:

wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb

This will open a configuration window where you can select the MySQL version you want to install and the repository to use. Select the appropriate options and then run sudo apt update to update the package list.

5. Once the package is available in your repository, you can install it by running the following command:

sudo apt install mysql-server

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.