• Hi,
    I can’t install WordPress locally.
    I got this message:
    Error establishing a database connection

    Mysql sens to work fine:

    mysql -u root -p
    xxxxxxxxx

    I created a database.
    create database wptest;

    then my information to install WP:

    Database Name : wptest
    Username : root
    Password : xxxxxxxx
    Database Host: localhost

    I tried with wp_cli too.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Tellyworth

    (@tellyworth)

    Are you setting up a local WordPress install for development or testing? If so the WordPress local environment is usually the best way:

    WordPress Local Environment

    Thread Starter artotal

    (@artotal)

    Thanks for your answer, I don’t know Docker and it seems to have a learning curve?
    I tried to install it and is not working.

    docker run -d -p 80:80 docker/getting-started
    I got an error:

    ?  docker-test docker run -d -p 80:80 docker/getting-started
    308f46586e2472609e1cb7b25a6155a423ae784cae2c7ceab2c476d55cdf5e52
    docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: address already in use.
    • This reply was modified 4 years, 2 months ago by artotal.
    • This reply was modified 4 years, 2 months ago by artotal.
    Thread Starter artotal

    (@artotal)

    I installed docker and it seems to work, but I have an error
    Error establishing a database connection
    He my file configuration:

    version: '3'
    
    services:
      # Database
      db:
        image: mysql:5.7
        volumes:
          - db_data:/var/lib/mysql
        restart: always
        environment:
          MYSQL_ROOT_PASSWORD: wordpress
          MYSQL_DATABASE: worpress
          MYSQL_USER: worpress
          MYSQL_PASSWORD: wordpress
        networks:
          - wpsite
      worpress:
        depends_on:
          - db
        image: wordpress:latest
        ports:
          - '8000:80'
        restart: always
        volumes: ['./:/var/www/html']
        environment:
          WORDPRESS_DB_HOST: db:3306
          WORDPRESS_DB_USER: wordpress
          WORDPRESS_DB_PASSWORD: wordpress
        networks:
          - wpsite
    networks:
      wpsite:
    volumes:
      db_data:
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘install WordPress on Mac OS 11’ is closed to new replies.