Advertisement
Guest User

Untitled

a guest
Oct 16th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 0 0
  1. Internal Server Error
  2.  
  3. SQLSTATE[HY000] [2002] Connection refused
  4.  
  5. [fatfree/lib/DB/SQL.php:466] PDO->__construct('mysql:host=127.0.0.1;port=3306;dbname=robohome','root','password',array(1002=>'SET NAMES utf8;'))
  6. [fatfree/app/Controllers/Controller.php:24] DBSQL->__construct('mysql:host=127.0.0.1;port=3306;dbname=robohome','root','password')
  7.  
  8. FROM php:5.6-apache
  9.  
  10. RUN docker-php-ext-install mysqli pdo pdo_mysql
  11. RUN a2enmod rewrite
  12.  
  13. FROM mysql:5.7
  14.  
  15. ENV MYSQL_ROOT_PASSWORD password
  16. ENV MYSQL_DATABASE robohome
  17.  
  18. COPY ./schema.sql /docker-entrypoint-initdb.d/
  19.  
  20. <?php
  21.  
  22. namespace Controllers;
  23.  
  24. class Controller
  25. {
  26. protected $f3;
  27. protected $db;
  28.  
  29. public function __construct()
  30. {
  31. $f3 = Base::instance();
  32. $this->f3 = $f3;
  33.  
  34. $mysqlServerName = $f3->get("MYSQL_SERVERNAME");
  35. $mysqlDatabseName = $f3->get("MYSQL_DBNAME");
  36.  
  37. //$container = DIContainerBuilder::buildDevContainer(); <-Not used currently
  38.  
  39. //Below is line 24 referred to in the error
  40. $db = new DBSQL(
  41. "mysql:host={$mysqlServerName};port=3306;dbname={$mysqlDatabseName}",
  42. $f3->get("MYSQL_USERNAME"),
  43. $f3->get("MYSQL_PASSWORD")
  44. );
  45.  
  46. $this->db = $db;
  47. }
  48.  
  49. MYSQL_SERVERNAME = "localhost" <-This is what I've tried changing to 127.0.0.1
  50. MYSQL_USERNAME = "root"
  51. MYSQL_PASSWORD = "password"
  52. MYSQL_DBNAME = "robohome"
  53.  
  54. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  55. f35066a16586 robohomeweb_mysql "docker-entrypoint.sh" 3 minutes ago Up 2 seconds 0.0.0.0:32777->3306/tcp robohomeweb_mysql_1
  56. 86d34eb34583 robohomeweb_php "apache2-foreground" 3 minutes ago Up 2 seconds 0.0.0.0:80->80/tcp robohomeweb_php_1
  57.  
  58. Building php
  59. Step 1 : FROM php:5.6-apache
  60. ---> 8f9b7e57129a
  61. Step 2 : RUN docker-php-ext-install mysqli pdo pdo_mysql
  62. ---> Using cache
  63. ---> fadd8f9e7207
  64. Step 3 : RUN a2enmod rewrite
  65. ---> Using cache
  66. ---> 9dfed7fdc60f
  67. Successfully built 9dfed7fdc60f
  68. Building mysql
  69. Step 1 : FROM mysql:5.7
  70. ---> eda6a4884645
  71. Step 2 : ENV MYSQL_ROOT_PASSWORD password
  72. ---> Using cache
  73. ---> 759895ac5772
  74. Step 3 : ENV MYSQL_DATABASE robohome
  75. ---> Using cache
  76. ---> e926c5ecc088
  77. Step 4 : COPY ./schema.sql /docker-entrypoint-initdb.d/
  78. ---> Using cache
  79. ---> cf5d00aa8020
  80. Successfully built cf5d00aa8020
  81. Starting robohomeweb_php_1
  82. Starting robohomeweb_mysql_1
  83. Attaching to robohomeweb_mysql_1, robohomeweb_php_1
  84. php_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
  85. php_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
  86. php_1 | [Sun Oct 16 20:21:17.944575 2016] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.26 configured -- resuming normal operations
  87. php_1 | [Sun Oct 16 20:21:17.946919 2016] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
  88. mysql_1 | 2016-10-16T20:21:18.036272Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  89. mysql_1 | 2016-10-16T20:21:18.038330Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 1 ...
  90. mysql_1 | 2016-10-16T20:21:18.043331Z 0 [Note] InnoDB: PUNCH HOLE support available
  91. mysql_1 | 2016-10-16T20:21:18.043603Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  92. mysql_1 | 2016-10-16T20:21:18.043951Z 0 [Note] InnoDB: Uses event mutexes
  93. mysql_1 | 2016-10-16T20:21:18.044077Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  94. mysql_1 | 2016-10-16T20:21:18.044260Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
  95. mysql_1 | 2016-10-16T20:21:18.044414Z 0 [Note] InnoDB: Using Linux native AIO
  96. mysql_1 | 2016-10-16T20:21:18.045150Z 0 [Note] InnoDB: Number of pools: 1
  97. mysql_1 | 2016-10-16T20:21:18.045620Z 0 [Note] InnoDB: Using CPU crc32 instructions
  98. mysql_1 | 2016-10-16T20:21:18.047629Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
  99. mysql_1 | 2016-10-16T20:21:18.057705Z 0 [Note] InnoDB: Completed initialization of buffer pool
  100. mysql_1 | 2016-10-16T20:21:18.059988Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
  101. mysql_1 | 2016-10-16T20:21:18.074670Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
  102. mysql_1 | 2016-10-16T20:21:18.101209Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
  103. mysql_1 | 2016-10-16T20:21:18.101433Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
  104. mysql_1 | 2016-10-16T20:21:18.354806Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
  105. mysql_1 | 2016-10-16T20:21:18.356928Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
  106. mysql_1 | 2016-10-16T20:21:18.357158Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
  107. mysql_1 | 2016-10-16T20:21:18.358049Z 0 [Note] InnoDB: Waiting for purge to start
  108. mysql_1 | 2016-10-16T20:21:18.412987Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 12179647
  109. mysql_1 | 2016-10-16T20:21:18.414470Z 0 [Note] Plugin 'FEDERATED' is disabled.
  110. mysql_1 | 2016-10-16T20:21:18.421833Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
  111. mysql_1 | 2016-10-16T20:21:18.424144Z 0 [Note] InnoDB: Buffer pool(s) load completed at 161016 20:21:18
  112. mysql_1 | 2016-10-16T20:21:18.425607Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
  113. mysql_1 | 2016-10-16T20:21:18.427018Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
  114. mysql_1 | 2016-10-16T20:21:18.427581Z 0 [Note] IPv6 is available.
  115. mysql_1 | 2016-10-16T20:21:18.427749Z 0 [Note] - '::' resolves to '::';
  116. mysql_1 | 2016-10-16T20:21:18.428019Z 0 [Note] Server socket created on IP: '::'.
  117. mysql_1 | 2016-10-16T20:21:18.456023Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
  118. mysql_1 | 2016-10-16T20:21:18.456354Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
  119. mysql_1 | 2016-10-16T20:21:18.480237Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
  120. mysql_1 | 2016-10-16T20:21:18.488758Z 0 [Note] Event Scheduler: Loaded 0 events
  121. mysql_1 | 2016-10-16T20:21:18.490880Z 0 [Note] mysqld: ready for connections.
  122. mysql_1 | Version: '5.7.16' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement