SodaCoder
Posts: 9
Joined: Sun May 12, 2019 6:27 pm

[SOLVED] MySQL not installing

Sat Jan 04, 2020 12:22 pm

It turns out that i had to install mariadb-server, instead!
Hi everyone,

I am following a raspberry pi guide ( https://projects.raspberrypi.org/en/pro ... wordpress/ ) and i tried the command sudo apt-get install mysql-server php-mysql -y, but it resulted in the error:

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


And if it helps i'm using Raspbian Buster.

User avatar
rpdom
Posts: 17004
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: [SOLVED] MySQL not installing

Sat Jan 04, 2020 12:41 pm

SodaCoder wrote:
Sat Jan 04, 2020 12:22 pm
It turns out that i had to install mariadb-server, instead!
Yes, MariaDB has replaced MySQL. It is a better product in my experience and has more features. Plus it is close to 100% backward compatible with MySQL.
Unreadable squiggle

DaveInUK
Posts: 25
Joined: Sat Dec 21, 2019 11:07 am
Location: Near Bath in the UK.

Re: [SOLVED] MySQL not installing

Sat Jan 18, 2020 5:37 pm

I'm having similar build issues with Wordpress and getting the ubiquitous error statement :

"your PHP is installation appears to be missing the MySQL extension which is required by Wordpress"

I've found numerous posts on this subject but none have worked for me.

I see in this post that the issue was with MariaDB, but that isn't an issue for me because it was automatically prompted as a substitute and it set-up ok.

I recent posts I've seen that the issue is connected with php using Mysqli whereas older Wordpress used Mysql. But, I've only been using the latest Wordpress.org installation and also confirmed that my php is the latest version.

This was installed using

Code: Select all

sudo apt-get install php7.2-mysql 
sudo service apache2 restart 
One point I can't understand is that if I look at phpinfo() , although it shows the
correct version : 7.3.11-1-deb10u1
it doesn't have any references to Mysql or Mysqli , other than in the "Module Authors" section?

I would appreciate any help because I must be missing something very stupid.
Dave
Cheers,
Dave

I'm feeling optimistic, but I'm sure something with go wrong :!:

SodaCoder
Posts: 9
Joined: Sun May 12, 2019 6:27 pm

Re: [SOLVED] MySQL not installing

Sun Jan 19, 2020 8:42 am

DaveInUK wrote:
Sat Jan 18, 2020 5:37 pm
I'm having similar build issues with Wordpress and getting the ubiquitous error statement :

"your PHP is installation appears to be missing the MySQL extension which is required by Wordpress"

I've found numerous posts on this subject but none have worked for me.

I see in this post that the issue was with MariaDB, but that isn't an issue for me because it was automatically prompted as a substitute and it set-up ok.

I recent posts I've seen that the issue is connected with php using Mysqli whereas older Wordpress used Mysql. But, I've only been using the latest Wordpress.org installation and also confirmed that my php is the latest version.

This was installed using

Code: Select all

sudo apt-get install php7.2-mysql 
sudo service apache2 restart 
One point I can't understand is that if I look at phpinfo() , although it shows the
correct version : 7.3.11-1-deb10u1
it doesn't have any references to Mysql or Mysqli , other than in the "Module Authors" section?

I would appreciate any help because I must be missing something very stupid.
Dave

Just to be sure, have you got all of this software?

Code: Select all

apache2
php
mysql-server
php-mysql
If you do, you might need to reinstall all of those packages.

Unless you forgot to start mysql setup

Code: Select all

sudo mysql_secure_installation

DaveInUK
Posts: 25
Joined: Sat Dec 21, 2019 11:07 am
Location: Near Bath in the UK.

Re: [SOLVED] MySQL not installing

Sun Jan 19, 2020 3:24 pm

Thanks for your reply and suggestions.
I first tried

Code: Select all

sudo mysql_secure_installation
and it showed that MariaDB was already installed.
I then installed Synaptic on the desktop using

Code: Select all

sudo apt-get install synaptic
This showed that the following are installed (all at latest versions);

Code: Select all

apache2  version 2.40.38-3+deb10u3
php  version 2:7.3+69
mariadb-server-10.0  version 10.0.28-2+b1
php7.2-mysql  version 7.2.9-1+b2
I then cleared all of the browser history and cache and looked again at phpinfo() but there were still no references to Mysql/Mysqli or mariaDB.

I think it's time for me to restart the whole process again!
Thanks again for your time.
Cheers
Dave

Return to “Troubleshooting”