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?

asked May 4, 2020 at 6:41
3

1 Answer 1

1

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

answered May 4, 2020 at 7:23
1
  • 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. Commented May 6, 2020 at 11:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.