Re: Can't Start MySQL Server from PHP

From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Thu, 21 Jun 2018 17:06:19 +0100
Message-ID: <pggids$el2$1_at_dont-email.me>


On 20/06/18 11:49, Joseph Hesse wrote:
> I am running MySQL 8.011 and PHP 7.2.6 on Fedora 28 Linux.
>
> I tried PHP to connect to the server with the usual command:
>
> $conn = _at_mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR
> die('Could not connect to MySQL: ' . mysqli_connect_error() );
>
> and got the error message:
>
> "Could not connect to MySQL: The server requested authentication method
> unknown to the client"
>
> The values of DB_HOST, etc are correct and they work when I connect to
> the server from the command line.
>
> I tried changing default-authentication-plugin to mysql_native_password
> in my.cnf and restarting the server but I got the same error message.
>
> Your help will be much appreciated.
>
> Joe
What is DB_HOST value?
I vahguely recall issues using 127.0.0.1 versus 'localhost'...

-- 
Renewable energy: Expensive solutions that don't work to a problem that 
doesn't exist instituted by self legalising protection rackets that 
don't protect,  masquerading as public servants who don't serve the public.
Received on Thu Jun 21 2018 - 18:06:19 CEST

Original text of this message