I tried to created a LAMP web-server with Wordpress following that guide: https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress/6/. But when I used this command to install MySQL:
sudo apt-get install mysql-server php-mysql -y
I've got this error:
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
So, I installed MariaDB and created Wordpress database. I used these commands:
sudo apt install mariadb-server
sudo service apache2 restart
cd /var/www/html/
sudo wget http://wordpress.org/latest.tar.gz
sudo tar xzf latest.tar.gz
sudo mv wordpress/* .
sudo chown -R www-data: .
sudo mysql_secure_installation
sudo mysql -uroot -p
create database wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'my_password';
FLUSH PRIVILEGES;
But Wordpress configuration page gave me an error:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
.
Should I install MySQL instead MariaDB? Or there's another problem?
-
See raspberrypi.stackexchange.com/questions/110961/…Milliways– Milliways2020年05月04日 06:49:53 +00:00Commented May 4, 2020 at 6:49
-
@Milliways, I've removed maria-db and installed default-mysql-server, but nothing has changed.Amphyx– Amphyx2020年05月04日 06:57:09 +00:00Commented May 4, 2020 at 6:57
-
Does this answer your question? Trying to install MySQL: Package 'mysql-server' has no installation candidateDougie– Dougie2020年05月04日 18:57:57 +00:00Commented May 4, 2020 at 18:57
1 Answer 1
I followed that guide: https://raspberrytips.com/wordpress-on-raspberry-pi/. It helped me to properly configure MariaDB and the error disappeared.
-
Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.Ingo– Ingo2020年05月06日 11:09:41 +00:00Commented May 6, 2020 at 11:09
Explore related questions
See similar questions with these tags.