welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

help with connection. I can't connect to mysql #606

Closed vdipinto closed 3 years ago

vdipinto commented 4 years ago

I wonder if anyone can help me. I have the following issue. I can't connect. If anyone can direct me to the solution it would save my life!

We can't connect to the MySQL server using credentials specified in the Movefile. Double check them or try to debug your system configuration.

This is what happens when I use docker-compose up

orizontals@Vitos-iMac vito-dip-portfolio % docker-compose up
Starting root_db ... done
Starting vito-dip-portfolio_wordpress  ... done
Starting vito-dip-portfolio_phpmyadmin ... done
Starting vito-dip-portfolio_wordmove   ... done
Attaching to root_db, vito-dip-portfolio_wordpress, vito-dip-portfolio_phpmyadmin, vito-dip-portfolio_wordmove
phpmyadmin_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.96.4. Set the 'ServerName' directive globally to suppress this message
wordpress_1   | [14-Jul-2020 18:37:52 UTC] PHP Warning:  mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress_1   | 
wordpress_1   | MySQL Connection Error: (2002) Connection refused
phpmyadmin_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.96.4. Set the 'ServerName' directive globally to suppress this message
phpmyadmin_1  | [Tue Jul 14 18:37:52.639253 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.6 configured -- resuming normal operations
phpmyadmin_1  | [Tue Jul 14 18:37:52.639311 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
root_db       | 2020-07-14T18:37:52.990428Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
root_db       | 2020-07-14T18:37:52.995609Z 0 [Note] mysqld (mysqld 5.7.27) starting as process 1 ...
root_db       | 2020-07-14T18:37:53.003221Z 0 [Note] InnoDB: PUNCH HOLE support available
root_db       | 2020-07-14T18:37:53.003274Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
root_db       | 2020-07-14T18:37:53.003279Z 0 [Note] InnoDB: Uses event mutexes
root_db       | 2020-07-14T18:37:53.003290Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
root_db       | 2020-07-14T18:37:53.003295Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
root_db       | 2020-07-14T18:37:53.003297Z 0 [Note] InnoDB: Using Linux native AIO
root_db       | 2020-07-14T18:37:53.003621Z 0 [Note] InnoDB: Number of pools: 1
root_db       | 2020-07-14T18:37:53.004052Z 0 [Note] InnoDB: Using CPU crc32 instructions
root_db       | 2020-07-14T18:37:53.008457Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
root_db       | 2020-07-14T18:37:53.020256Z 0 [Note] InnoDB: Completed initialization of buffer pool
root_db       | 2020-07-14T18:37:53.023513Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
root_db       | 2020-07-14T18:37:53.104242Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
root_db       | 2020-07-14T18:37:53.237833Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
root_db       | 2020-07-14T18:37:53.238425Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
root_db       | 2020-07-14T18:37:53.299506Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
root_db       | 2020-07-14T18:37:53.326239Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
root_db       | 2020-07-14T18:37:53.326279Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
root_db       | 2020-07-14T18:37:53.327001Z 0 [Note] InnoDB: Waiting for purge to start
root_db       | 2020-07-14T18:37:53.377773Z 0 [Note] InnoDB: 5.7.27 started; log sequence number 13770732
root_db       | 2020-07-14T18:37:53.378407Z 0 [Note] Plugin 'FEDERATED' is disabled.
root_db       | 2020-07-14T18:37:53.379268Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
root_db       | 2020-07-14T18:37:53.446611Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
root_db       | 2020-07-14T18:37:53.465296Z 0 [Warning] CA certificate ca.pem is self signed.
root_db       | 2020-07-14T18:37:53.470881Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
root_db       | 2020-07-14T18:37:53.471578Z 0 [Note] IPv6 is available.
root_db       | 2020-07-14T18:37:53.471656Z 0 [Note]   - '::' resolves to '::';
root_db       | 2020-07-14T18:37:53.471684Z 0 [Note] Server socket created on IP: '::'.
root_db       | 2020-07-14T18:37:53.474787Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
root_db       | 2020-07-14T18:37:53.494163Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200714 18:37:53
root_db       | 2020-07-14T18:37:53.699956Z 0 [Note] Event Scheduler: Loaded 0 events
root_db       | 2020-07-14T18:37:53.700311Z 0 [Note] mysqld: ready for connections.
root_db       | Version: '5.7.27'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
wordpress_1   | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.96.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1   | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.96.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1   | [Tue Jul 14 18:37:55.829834 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.8 configured -- resuming normal operations
wordpress_1   | [Tue Jul 14 18:37:55.829914 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

This is my movefile.yml

global:
    sql_adapter: wpcli

local:
    vhost: "http://localhost:8000"
    wordpress_path: "/var/www/html/wp-content" # use an absolute path here

    database:
        name: "wordpress"
        user: "root"
        password: "wordpress"
        host: "database"

        # paths: # you can customize wordpress internal paths
        #   wp_content: wp-content
        #   uploads: wp-content/uploads
        #   plugins: wp-content/plugins
        #   themes: wp-content/themes
        #   languages: wp-content/languages

production:
    vhost: "https://###########"
    wordpress_path: "/###.###.##.###" # use an absolute path here

    database:
        name: "###.###.##.###"
        user: "###.###"
        password: "###########"
        host: "###.###.##.###"
        # port: 3308 # Use just in case you have exotic server config
        # mysqldump_options: --max_allowed_packet=50MB # Only available if using SSH
        # mysql_options: --protocol=TCP # Only available if using SSH

    exclude:
        - '.git/'
        - '.gitignore'
        - 'node_modules/'
        - 'bin/'
        - 'tmp/*'
        - 'Gemfile*'
        - 'Movefile'
        - 'movefile'
        - 'movefile.yml'
        - 'movefile.yaml'
        - 'wp-config.php'
        - 'wp-content/*.sql.gz'
        - '*.orig'

    ssh:
        host: "###.###.##.###"
        user: "###"
alessandro-fazzi commented 4 years ago

Hi,

I'm so sorry, but i can't get where's the wordmove's problem here. I only see a log from docker-compose, but there's no trace of a single wordmove command.

There's a chance you missed to report something in the issue?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.