presspack icon indicating copy to clipboard operation
presspack copied to clipboard

MySQL connection error

Open ElizabethCAllen opened this issue 6 years ago • 3 comments

When I try to start docker, and I cd into my presspack file and give the command "docker-compose up" it gives me errors.

Starting presspack_db_1 ... done Starting presspack_wordpress_1 ... done Starting presspack_phpmyadmin_1 ... done Attaching to presspack_db_1, presspack_wordpress_1, presspack_phpmyadmin_1 db_1 | 2018-10-10T01:29:33.760167Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). db_1 | 2018-10-10T01:29:33.765512Z 0 [Note] mysqld (mysqld 5.7.23) starting as process 1 ... db_1 | 2018-10-10T01:29:34.137489Z 0 [Note] InnoDB: PUNCH HOLE support available db_1 | 2018-10-10T01:29:34.139809Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins db_1 | 2018-10-10T01:29:34.141472Z 0 [Note] InnoDB: Uses event mutexes db_1 | 2018-10-10T01:29:34.143867Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier db_1 | 2018-10-10T01:29:34.144729Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 db_1 | 2018-10-10T01:29:34.145656Z 0 [Note] InnoDB: Using Linux native AIO db_1 | 2018-10-10T01:29:34.169431Z 0 [Note] InnoDB: Number of pools: 1 db_1 | 2018-10-10T01:29:34.690417Z 0 [Note] InnoDB: Using CPU crc32 instructions db_1 | 2018-10-10T01:29:34.769451Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M db_1 | 2018-10-10T01:29:35.078961Z 0 [Note] InnoDB: Completed initialization of buffer pool db_1 | 2018-10-10T01:29:35.301557Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). db_1 | 2018-10-10T01:29:35.418070Z 0 [Note] InnoDB: Highest supported file format is Barracuda. db_1 | 2018-10-10T01:29:35.992180Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 2593926 db_1 | 2018-10-10T01:29:35.993621Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 2593935 db_1 | 2018-10-10T01:29:35.995253Z 0 [Note] InnoDB: Database was not shutdown normally! db_1 | 2018-10-10T01:29:35.996587Z 0 [Note] InnoDB: Starting crash recovery. db_1 | 2018-10-10T01:29:37.924679Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" db_1 | 2018-10-10T01:29:37.926746Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables db_1 | 2018-10-10T01:29:37.927767Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... db_1 | 2018-10-10T01:29:46.125970Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. db_1 | 2018-10-10T01:29:46.169664Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. db_1 | 2018-10-10T01:29:46.169879Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. db_1 | 2018-10-10T01:29:46.175110Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 10874ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.) db_1 | 2018-10-10T01:29:46.190378Z 0 [Note] InnoDB: 5.7.23 started; log sequence number 2593935 db_1 | 2018-10-10T01:29:46.203756Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool db_1 | 2018-10-10T01:29:46.522393Z 0 [Note] Plugin 'FEDERATED' is disabled. db_1 | 2018-10-10T01:29:46.557444Z 0 [Note] InnoDB: Buffer pool(s) load completed at 181010 1:29:46 db_1 | 2018-10-10T01:29:46.809208Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key db_1 | 2018-10-10T01:29:46.832497Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 db_1 | 2018-10-10T01:29:46.855514Z 0 [Note] IPv6 is available. db_1 | 2018-10-10T01:29:46.859956Z 0 [Note] - '::' resolves to '::'; db_1 | 2018-10-10T01:29:46.870716Z 0 [Note] Server socket created on IP: '::'. db_1 | 2018-10-10T01:29:47.390608Z 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. db_1 | 2018-10-10T01:29:47.454565Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.455937Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.457772Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.463663Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.465065Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.470872Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.521265Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.522535Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. db_1 | 2018-10-10T01:29:47.994382Z 0 [Note] Event Scheduler: Loaded 0 events wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 phpmyadmin_1 | /usr/lib/python2.7/site-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. phpmyadmin_1 | 'Supervisord is running as root and it is searching ' phpmyadmin_1 | 2018-10-10 01:29:55,562 CRIT Supervisor running as root (no user in config file) phpmyadmin_1 | 2018-10-10 01:29:55,566 INFO Included extra file "/etc/supervisor.d/nginx.ini" during parsing phpmyadmin_1 | 2018-10-10 01:29:55,567 INFO Included extra file "/etc/supervisor.d/php.ini" during parsing phpmyadmin_1 | Unlinking stale socket /run/supervisord.sock phpmyadmin_1 | 2018-10-10 01:29:56,246 INFO RPC interface 'supervisor' initialized phpmyadmin_1 | 2018-10-10 01:29:56,277 CRIT Server 'unix_http_server' running without any HTTP authentication checking phpmyadmin_1 | 2018-10-10 01:29:56,280 INFO supervisord started with pid 1 phpmyadmin_1 | 2018-10-10 01:29:57,290 INFO spawned: 'php-fpm' with pid 14 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 phpmyadmin_1 | 2018-10-10 01:29:57,309 INFO spawned: 'nginx' with pid 15 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/1130): Host '172.20.0.3' is not allowed to connect to this MySQL server in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (1130) Host '172.20.0.3' is not allowed to connect to this MySQL server presspack_wordpress_1 exited with code 1

ElizabethCAllen avatar Oct 10 '18 01:10 ElizabethCAllen

Getting the same issue as well

JosiahSlade avatar Dec 09 '18 07:12 JosiahSlade

Is it docker running properly ? What OS you use? I'm using win10 professional and everything working great.

krystianjj avatar Jan 23 '19 18:01 krystianjj

Try adding more environment values in wordpress services

` version: "3" services: . . .

  wordpress:
    .
    .
    .
    environment:
      WORDPRESS_DB_HOST: db:3306
      DB_NAME: wordpress
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress

`

wilcho-vnz avatar Apr 05 '19 14:04 wilcho-vnz