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?