I am trying to install MySQL
on a Raspberry Pi 3
. Currently I have Apache
and PHP
installed. I now need to install MySQL
but when I do sudo apt-get install mysql-server php-mysql -y
, I receive an error telling me that there is no such package:
E: Package 'mysql-server' has no installation candidate
Complete output:
pi@raspberrypi:/var/www/html $ sudo apt-get install mysql-server php-mysql -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.0
E: Package 'mysql-server' has no installation candidate```
I guess using MariaDB
fixes my issue.
sudo apt install mariadb-server php-mysql -y