1

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?

0

I followed that guide: https://raspberrytips.com/wordpress-on-raspberry-pi/. It helped me to properly configure MariaDB and the error disappeared.

| improve this answer | |
  • 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 May 6 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.