SQLSTATE[2002] Connection refused

I cant join to my mariadb on my homepage, it writes that connection refused.
BUT i can make migrations and other doctrine console fitures (here is OK.. why?)

Why i look at connection refused on all of my pages? but doctrine is ok

here is 2 types of connections? one for doctrine and other for user? what the difference when DATABASE_URL is only one?

i use mariadb 10.5.5 in docker. here is configuration:

docker-compose.yml

    mysql:
        image: 'mariadb'
        restart: always
        environment:
            - MYSQL_ROOT_PASSWORD=pass
            - MYSQL_DATABASE=dbname
            - MYSQL_USER=user
            - MYSQL_PASSWORD=pass
        volumes:
            - ./data/mysql:/var/lib/mysql
        ports:
            - 3306:3306
        networks:
            - task 

.env

DATABASE_URL=mysql://user:[email protected]:3306/dbname?serverVersion=mariadb-10.5.5

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *