A
A
animr2021-01-14 23:06:55
PHP
animr, 2021-01-14 23:06:55

How to fix connection error to MySql and phpmyadmin?

Help with the following error on
mac os catalina
PHP 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS )
Server version: Apache/2.4.41 (Unix)
Server built: Jun 5 2020 23: 42:06

Connection error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client


host file
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
#127.0.0.1      db.loc
255.255.255.255 broadcasthost
::1             localhost
#::1             db.loc
#192.168.64.2    tender.go
#192.168.64.2   alco.loc
#192.168.64.2   mede.go
127.0.0.1       tender.loc
127.0.0.1       orbis.loc
127.0.0.1       db.loc

# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section


httpd-vhosts.conf file
# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/usr/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
    CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" comm$
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/rewaz/lcsites/tender.loc"
    ServerName tender.loc
    ErrorLog "/Users/rewaz/lcsites/tender.loc-error_log"
    CustomLog "/Users/rewaz/lcsites/tender.loc-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/m/lcsites/db.loc"
    ServerName db.loc
    ErrorLog "/Users/rewaz/lcsites/db.loc-error_log"
    CustomLog "/Users/rewaz/lcsites/db.loc-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/rewaz/lcsites/orbis.loc"
    ServerName orbis.loc
    ErrorLog "/Users/rewaz/lcsites/orbis.loc-error_log"
    CustomLog "/Users/rewaz/lcsites/orbis.loc-access_log" common
</VirtualHost>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Loli E1ON, 2021-01-14
@E1ON

https://stackoverflow.com/questions/52364415/php-w...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question