Prisma1: Prisma init doesn't seem to work?

Created on 12 May 2018  Â·  8Comments  Â·  Source: prisma/prisma1

Bug Report

Current behavior

Running prisma init does not genera server files. It only generates the 3 files below.

datamodel.graphql  
docker-compose.yml 
prisma.yml

After prisma init I run docker-compose up -d and then I run prisma deploy.

I end up getting this error

{
  "errors": [
    {
      "message": "Project not found: 'graphiql@default'",
      "code": 3016,
      "requestId": "local:api:cjh3r908l000s0834adw100sj"
    }
  ]
}

Reproduction

Follow the prisma init instructions

? Set up a new Prisma server or deploy to an existing server? Create new database
? What kind of database do you want to deploy to? MySQL

Just trying to leverage the default functionality to check this out with docker.

If your problem can be reproduced with a certain service definition, please create a new GitHub repository with the reproduction instructions.

Expected behavior?

Basic project is accessible as expected after runnign the commands above.

bu2-confirmed bu0-needs-info statustale

Most helpful comment

Here is a full print out of the command line. I have run docker-compose up instead of detached mode to get the logs.

> prisma init hello-world
? Set up a new Prisma server or deploy to an existing server? Create new database
? What kind of database do you want to deploy to? MySQL

Created 3 new files:

  prisma.yml           Prisma service definition
  datamodel.graphql    GraphQL SDL-based datamodel (foundation for database)
  docker-compose.yml   Docker configuration file

Next steps:

  1. Open folder: cd hello-world
  2. Start your Prisma server: docker-compose up -d
  3. Deploy your Prisma service: prisma deploy
  4. Read more about Prisma server:
     http://bit.ly/prisma-server-overview

/Users/ryanme/sandbox [ryanme@GS-M135] [14:33]
> cd hello-world

/Users/ryanme/sandbox/hello-world [ryanme@GS-M135] [14:33]
> ls
datamodel.graphql  docker-compose.yml prisma.yml

/Users/ryanme/sandbox/hello-world [ryanme@GS-M135] [14:33]
> docker-compose up
Creating network "helloworld_default" with the default driver
Creating volume "helloworld_mysql" with default driver
Pulling prisma (prismagraphql/prisma:1.8)...
1.8: Pulling from prismagraphql/prisma
ff3a5c916c92: Pull complete
b2573fe715ab: Pull complete
6e339588b315: Pull complete
26a613666747: Pull complete
d0842e59f460: Pull complete
e22233de5f8b: Pull complete
ae47863d43d7: Pull complete
cf23e78aa66e: Pull complete
bbcb37b17a85: Pull complete
Digest: sha256:922a533d68d23c02ab248971e6a076c2840d2a98efff21fcfcc3882254661ec8
Status: Downloaded newer image for prismagraphql/prisma:1.8
Pulling mysql (mysql:5.7)...
5.7: Pulling from library/mysql
f2aa67a397c4: Pull complete
1accf44cb7e0: Pull complete
2d830ea9fa68: Pull complete
740584693b89: Pull complete
4d620357ec48: Pull complete
ac3b7158d73d: Pull complete
a48d784ee503: Pull complete
bf1194add2f3: Pull complete
0e5c74178a02: Pull complete
e9201d309436: Pull complete
bf1ac4524e8e: Pull complete
Digest: sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf

Creating helloworld_prisma_1 ... done

Attaching to helloworld_prisma_1, helloworld_mysql_1
mysql_1   | Initializing database
mysql_1   | 2018-05-17T12:40:46.138288Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:46.772839Z 0 [Warning] InnoDB: New log files created, LSN=45790
mysql_1   | 2018-05-17T12:40:46.855849Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
mysql_1   | 2018-05-17T12:40:46.915911Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8596dc5a-59cf-11e8-8a42-0242ac1b0002.
mysql_1   | 2018-05-17T12:40:46.917558Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
mysql_1   | 2018-05-17T12:40:46.918139Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysql_1   | 2018-05-17T12:40:47.534421Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534470Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534488Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534541Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534560Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534601Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534668Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534683Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | Database initialized
mysql_1   | Initializing certificates
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | ..............+++
mysql_1   | .......+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'ca-key.pem'
mysql_1   | -----
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | ...+++
mysql_1   | .........+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'server-key.pem'
mysql_1   | -----
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | .................+++
mysql_1   | .......................................................................................................................................+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'client-key.pem'
mysql_1   | -----
mysql_1   | Certificates initialized
mysql_1   | MySQL init process in progress...
mysql_1   | 2018-05-17T12:40:49.816942Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:49.820761Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 91 ...
mysql_1   | 2018-05-17T12:40:49.832626Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1   | 2018-05-17T12:40:49.832683Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1   | 2018-05-17T12:40:49.832698Z 0 [Note] InnoDB: Uses event mutexes
mysql_1   | 2018-05-17T12:40:49.832708Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1   | 2018-05-17T12:40:49.832717Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1   | 2018-05-17T12:40:49.832724Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1   | 2018-05-17T12:40:49.833059Z 0 [Note] InnoDB: Number of pools: 1
mysql_1   | 2018-05-17T12:40:49.833302Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1   | 2018-05-17T12:40:49.834870Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1   | 2018-05-17T12:40:49.846310Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1   | 2018-05-17T12:40:49.855100Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1   | 2018-05-17T12:40:49.866922Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1   | 2018-05-17T12:40:49.880630Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1   | 2018-05-17T12:40:49.880809Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1   | 2018-05-17T12:40:49.953099Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1   | 2018-05-17T12:40:49.954189Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:49.954220Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:49.955266Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2589156
mysql_1   | 2018-05-17T12:40:49.955686Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:49.956095Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1   | 2018-05-17T12:40:49.959105Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180517 12:40:49
mysql_1   | 2018-05-17T12:40:49.961748Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1   | 2018-05-17T12:40:49.961960Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1   | 2018-05-17T12:40:49.968235Z 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.
mysql_1   | 2018-05-17T12:40:49.969606Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969659Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969674Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969756Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969764Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969775Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.971640Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.971674Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.981475Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1   | 2018-05-17T12:40:49.981905Z 0 [Note] mysqld: ready for connections.
mysql_1   | Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
mysql_1   | 2018-05-17T12:40:52.970239Z 4 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970278Z 4 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970288Z 4 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970345Z 4 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970364Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970375Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970500Z 4 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970510Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   |
mysql_1   | 2018-05-17T12:40:52.972660Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql_1   | 2018-05-17T12:40:52.972693Z 0 [Note] Shutting down slave threads
mysql_1   | 2018-05-17T12:40:52.972699Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql_1   | 2018-05-17T12:40:52.972707Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1   | 2018-05-17T12:40:52.972835Z 0 [Note] Binlog end
mysql_1   | 2018-05-17T12:40:52.973414Z 0 [Note] Shutting down plugin 'ngram'
mysql_1   | 2018-05-17T12:40:52.973436Z 0 [Note] Shutting down plugin 'partition'
mysql_1   | 2018-05-17T12:40:52.973440Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql_1   | 2018-05-17T12:40:52.973445Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql_1   | 2018-05-17T12:40:52.973450Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql_1   | 2018-05-17T12:40:52.973505Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql_1   | 2018-05-17T12:40:52.973540Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1   | 2018-05-17T12:40:52.973560Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql_1   | 2018-05-17T12:40:52.973564Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql_1   | 2018-05-17T12:40:52.973586Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql_1   | 2018-05-17T12:40:52.973662Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql_1   | 2018-05-17T12:40:52.973665Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql_1   | 2018-05-17T12:40:52.973667Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql_1   | 2018-05-17T12:40:52.973671Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql_1   | 2018-05-17T12:40:52.973700Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql_1   | 2018-05-17T12:40:52.973705Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql_1   | 2018-05-17T12:40:52.973708Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql_1   | 2018-05-17T12:40:52.973712Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql_1   | 2018-05-17T12:40:52.973717Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql_1   | 2018-05-17T12:40:52.973721Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql_1   | 2018-05-17T12:40:52.973725Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql_1   | 2018-05-17T12:40:52.973729Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql_1   | 2018-05-17T12:40:52.973734Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql_1   | 2018-05-17T12:40:52.973820Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql_1   | 2018-05-17T12:40:52.973826Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql_1   | 2018-05-17T12:40:52.973833Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql_1   | 2018-05-17T12:40:52.973857Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql_1   | 2018-05-17T12:40:52.973859Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql_1   | 2018-05-17T12:40:52.973863Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql_1   | 2018-05-17T12:40:52.973869Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql_1   | 2018-05-17T12:40:52.973873Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql_1   | 2018-05-17T12:40:52.973875Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql_1   | 2018-05-17T12:40:52.973880Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql_1   | 2018-05-17T12:40:52.973931Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql_1   | 2018-05-17T12:40:52.973946Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql_1   | 2018-05-17T12:40:52.973949Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql_1   | 2018-05-17T12:40:52.973953Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql_1   | 2018-05-17T12:40:52.973956Z 0 [Note] Shutting down plugin 'InnoDB'
mysql_1   | 2018-05-17T12:40:52.974039Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql_1   | 2018-05-17T12:40:52.974238Z 0 [Note] InnoDB: Starting shutdown...
mysql_1   | 2018-05-17T12:40:53.075397Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:53.075663Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180517 12:40:53
mysql_1   | 2018-05-17T12:40:54.697441Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12358623
mysql_1   | 2018-05-17T12:40:54.700318Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1   | 2018-05-17T12:40:54.700356Z 0 [Note] Shutting down plugin 'MEMORY'
mysql_1   | 2018-05-17T12:40:54.700363Z 0 [Note] Shutting down plugin 'CSV'
mysql_1   | 2018-05-17T12:40:54.700369Z 0 [Note] Shutting down plugin 'sha256_password'
mysql_1   | 2018-05-17T12:40:54.700376Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql_1   | 2018-05-17T12:40:54.700531Z 0 [Note] Shutting down plugin 'binlog'
mysql_1   | 2018-05-17T12:40:54.703180Z 0 [Note] mysqld: Shutdown complete
mysql_1   |
mysql_1   |
mysql_1   | MySQL init process done. Ready for start up.
mysql_1   |
mysql_1   | 2018-05-17T12:40:54.998027Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:54.999152Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 1 ...
mysql_1   | 2018-05-17T12:40:55.001869Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1   | 2018-05-17T12:40:55.001934Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1   | 2018-05-17T12:40:55.001941Z 0 [Note] InnoDB: Uses event mutexes
mysql_1   | 2018-05-17T12:40:55.001947Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1   | 2018-05-17T12:40:55.001952Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1   | 2018-05-17T12:40:55.001957Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1   | 2018-05-17T12:40:55.002420Z 0 [Note] InnoDB: Number of pools: 1
mysql_1   | 2018-05-17T12:40:55.002520Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1   | 2018-05-17T12:40:55.003928Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1   | 2018-05-17T12:40:55.010034Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1   | 2018-05-17T12:40:55.011701Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1   | 2018-05-17T12:40:55.023389Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1   | 2018-05-17T12:40:55.032219Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1   | 2018-05-17T12:40:55.032310Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1   | 2018-05-17T12:40:55.120831Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1   | 2018-05-17T12:40:55.122318Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:55.122357Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:55.122688Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1   | 2018-05-17T12:40:55.173315Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 12358623
mysql_1   | 2018-05-17T12:40:55.173777Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1   | 2018-05-17T12:40:55.173781Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:55.177958Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1   | 2018-05-17T12:40:55.178003Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180517 12:40:55
mysql_1   | 2018-05-17T12:40:55.178203Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1   | 2018-05-17T12:40:55.180947Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1   | 2018-05-17T12:40:55.181021Z 0 [Note] IPv6 is available.
mysql_1   | 2018-05-17T12:40:55.181039Z 0 [Note]   - '::' resolves to '::';
mysql_1   | 2018-05-17T12:40:55.181058Z 0 [Note] Server socket created on IP: '::'.
mysql_1   | 2018-05-17T12:40:55.183184Z 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.
mysql_1   | 2018-05-17T12:40:55.185972Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186060Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186070Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186096Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186100Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186114Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.189693Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.189741Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.195693Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1   | 2018-05-17T12:40:55.196031Z 0 [Note] mysqld: ready for connections.
mysql_1   | Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
prisma_1  | Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5002ms.
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
prisma_1  |     at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
prisma_1  |     at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
prisma_1  |     at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef.acquireSession(BasicBackend.scala:218)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef.acquireSession$(BasicBackend.scala:217)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
prisma_1  |     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
prisma_1  |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
prisma_1  |     at java.lang.Thread.run(Thread.java:748)
prisma_1  | Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=mysql)(port=3306)(type=master) : Connection refused (Connection refused)
prisma_1  |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:161)
prisma_1  |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.connException(ExceptionMapper.java:79)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1040)
prisma_1  |     at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:490)
prisma_1  |     at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:144)
prisma_1  |     at org.mariadb.jdbc.Driver.connect(Driver.java:90)
prisma_1  |     at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101)
prisma_1  |     at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
prisma_1  |     at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
prisma_1  |     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
prisma_1  |     ... 3 more
prisma_1  | Caused by: java.net.ConnectException: Connection refused (Connection refused)
prisma_1  |     at java.net.PlainSocketImpl.socketConnect(Native Method)
prisma_1  |     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
prisma_1  |     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
prisma_1  |     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
prisma_1  |     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
prisma_1  |     at java.net.Socket.connect(Socket.java:589)
prisma_1  |     at java.net.Socket.connect(Socket.java:538)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:398)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1032)
prisma_1  |     ... 14 more

It seems the server can't connect to the db.

Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5002ms.

prisma deploy returns the following.

Creating stage default for service default ✔
Deploying service `default` to stage `default` to server `local` 415ms

Changes:

  User (Type)
  + Created type `User`
  + Created field `id` of type `GraphQLID!`
  + Created field `name` of type `String!`
  + Created field `updatedAt` of type `DateTime!`
  + Created field `createdAt` of type `DateTime!`

Applying changes 1.1s

Your Prisma GraphQL database endpoint is live:

  HTTP:  http://localhost:4466
  WS:    ws://localhost:4466

Going to my localhost on port 4466 goes to the graphiql client and I can see the schema, but I get the error below in the output window.

{
  "errors": [
    {
      "message": "Project not found: 'graphiql@default'",
      "code": 3016,
      "requestId": "local:api:cjhaj6q6d001e0964ycf00iet"
    }
  ]
}

Here is the docker-compose file

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.8
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: mysql
            host: mysql
            port: 3306
            user: root
            password: prisma
            migrations: true
  mysql:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: prisma
    volumes:
      - mysql:/var/lib/mysql
volumes:
  mysql:

Sorry if I missed something, but I have tried this in a million different combinations.

All 8 comments

This is really simple, so not sure what I am doing wrong. Running latest version of prisma. Installed with
yarn install -g prisma

Hey @ryannealmes you are doing everything right! The folder output looks correct!
Can you please share the content of docker-compose.yml and the result of prisma version?

It seems that you're not running the latest Prisma cluster locally.
With docker-compose pull you can update it.

Thanks!

docker-compose.yml

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.8
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: mysql
            host: mysql
            port: 3306
            user: root
            password: prisma
            migrations: true
  mysql:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: prisma
    volumes:
      - mysql:/var/lib/mysql
volumes:
  mysql:

prisma version

prisma/1.8.0 (darwin-x64) node-v9.11.1

docker-compose pull doesn't seem to do anything as everything is up to date according to what I get back

ryanme$ docker-compose pull
Pulling prisma (prismagraphql/prisma:1.8)...
1.8: Pulling from prismagraphql/prisma
Digest: sha256:8987b114d85f446bcf624e6c62cc3c898d39391d474a437af713d64610471a41
Status: Image is up to date for prismagraphql/prisma:1.8
Pulling mysql (mysql:5.7)...
5.7: Pulling from library/mysql
Digest: sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf
Status: Image is up to date for mysql:5.7

Let me know if I can provide any more information.

Any ideas on what I can do to get this working?

In your initial post you said

I end up getting this error

What steps after prisma deploy are you taking to receive this error?

Here is a full print out of the command line. I have run docker-compose up instead of detached mode to get the logs.

> prisma init hello-world
? Set up a new Prisma server or deploy to an existing server? Create new database
? What kind of database do you want to deploy to? MySQL

Created 3 new files:

  prisma.yml           Prisma service definition
  datamodel.graphql    GraphQL SDL-based datamodel (foundation for database)
  docker-compose.yml   Docker configuration file

Next steps:

  1. Open folder: cd hello-world
  2. Start your Prisma server: docker-compose up -d
  3. Deploy your Prisma service: prisma deploy
  4. Read more about Prisma server:
     http://bit.ly/prisma-server-overview

/Users/ryanme/sandbox [ryanme@GS-M135] [14:33]
> cd hello-world

/Users/ryanme/sandbox/hello-world [ryanme@GS-M135] [14:33]
> ls
datamodel.graphql  docker-compose.yml prisma.yml

/Users/ryanme/sandbox/hello-world [ryanme@GS-M135] [14:33]
> docker-compose up
Creating network "helloworld_default" with the default driver
Creating volume "helloworld_mysql" with default driver
Pulling prisma (prismagraphql/prisma:1.8)...
1.8: Pulling from prismagraphql/prisma
ff3a5c916c92: Pull complete
b2573fe715ab: Pull complete
6e339588b315: Pull complete
26a613666747: Pull complete
d0842e59f460: Pull complete
e22233de5f8b: Pull complete
ae47863d43d7: Pull complete
cf23e78aa66e: Pull complete
bbcb37b17a85: Pull complete
Digest: sha256:922a533d68d23c02ab248971e6a076c2840d2a98efff21fcfcc3882254661ec8
Status: Downloaded newer image for prismagraphql/prisma:1.8
Pulling mysql (mysql:5.7)...
5.7: Pulling from library/mysql
f2aa67a397c4: Pull complete
1accf44cb7e0: Pull complete
2d830ea9fa68: Pull complete
740584693b89: Pull complete
4d620357ec48: Pull complete
ac3b7158d73d: Pull complete
a48d784ee503: Pull complete
bf1194add2f3: Pull complete
0e5c74178a02: Pull complete
e9201d309436: Pull complete
bf1ac4524e8e: Pull complete
Digest: sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf

Creating helloworld_prisma_1 ... done

Attaching to helloworld_prisma_1, helloworld_mysql_1
mysql_1   | Initializing database
mysql_1   | 2018-05-17T12:40:46.138288Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:46.772839Z 0 [Warning] InnoDB: New log files created, LSN=45790
mysql_1   | 2018-05-17T12:40:46.855849Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
mysql_1   | 2018-05-17T12:40:46.915911Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8596dc5a-59cf-11e8-8a42-0242ac1b0002.
mysql_1   | 2018-05-17T12:40:46.917558Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
mysql_1   | 2018-05-17T12:40:46.918139Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysql_1   | 2018-05-17T12:40:47.534421Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534470Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534488Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534541Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534560Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534601Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534668Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:47.534683Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | Database initialized
mysql_1   | Initializing certificates
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | ..............+++
mysql_1   | .......+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'ca-key.pem'
mysql_1   | -----
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | ...+++
mysql_1   | .........+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'server-key.pem'
mysql_1   | -----
mysql_1   | Generating a 2048 bit RSA private key
mysql_1   | .................+++
mysql_1   | .......................................................................................................................................+++
mysql_1   | unable to write 'random state'
mysql_1   | writing new private key to 'client-key.pem'
mysql_1   | -----
mysql_1   | Certificates initialized
mysql_1   | MySQL init process in progress...
mysql_1   | 2018-05-17T12:40:49.816942Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:49.820761Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 91 ...
mysql_1   | 2018-05-17T12:40:49.832626Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1   | 2018-05-17T12:40:49.832683Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1   | 2018-05-17T12:40:49.832698Z 0 [Note] InnoDB: Uses event mutexes
mysql_1   | 2018-05-17T12:40:49.832708Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1   | 2018-05-17T12:40:49.832717Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1   | 2018-05-17T12:40:49.832724Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1   | 2018-05-17T12:40:49.833059Z 0 [Note] InnoDB: Number of pools: 1
mysql_1   | 2018-05-17T12:40:49.833302Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1   | 2018-05-17T12:40:49.834870Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1   | 2018-05-17T12:40:49.846310Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1   | 2018-05-17T12:40:49.855100Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1   | 2018-05-17T12:40:49.866922Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1   | 2018-05-17T12:40:49.880630Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1   | 2018-05-17T12:40:49.880809Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1   | 2018-05-17T12:40:49.953099Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1   | 2018-05-17T12:40:49.954189Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:49.954220Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:49.955266Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2589156
mysql_1   | 2018-05-17T12:40:49.955686Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:49.956095Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1   | 2018-05-17T12:40:49.959105Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180517 12:40:49
mysql_1   | 2018-05-17T12:40:49.961748Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1   | 2018-05-17T12:40:49.961960Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1   | 2018-05-17T12:40:49.968235Z 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.
mysql_1   | 2018-05-17T12:40:49.969606Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969659Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969674Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969756Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969764Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.969775Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.971640Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.971674Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:49.981475Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1   | 2018-05-17T12:40:49.981905Z 0 [Note] mysqld: ready for connections.
mysql_1   | Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql_1   | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
mysql_1   | 2018-05-17T12:40:52.970239Z 4 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970278Z 4 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970288Z 4 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970345Z 4 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970364Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970375Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970500Z 4 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:52.970510Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   |
mysql_1   | 2018-05-17T12:40:52.972660Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql_1   | 2018-05-17T12:40:52.972693Z 0 [Note] Shutting down slave threads
mysql_1   | 2018-05-17T12:40:52.972699Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql_1   | 2018-05-17T12:40:52.972707Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1   | 2018-05-17T12:40:52.972835Z 0 [Note] Binlog end
mysql_1   | 2018-05-17T12:40:52.973414Z 0 [Note] Shutting down plugin 'ngram'
mysql_1   | 2018-05-17T12:40:52.973436Z 0 [Note] Shutting down plugin 'partition'
mysql_1   | 2018-05-17T12:40:52.973440Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql_1   | 2018-05-17T12:40:52.973445Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql_1   | 2018-05-17T12:40:52.973450Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql_1   | 2018-05-17T12:40:52.973505Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql_1   | 2018-05-17T12:40:52.973540Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1   | 2018-05-17T12:40:52.973560Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql_1   | 2018-05-17T12:40:52.973564Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql_1   | 2018-05-17T12:40:52.973586Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql_1   | 2018-05-17T12:40:52.973662Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql_1   | 2018-05-17T12:40:52.973665Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql_1   | 2018-05-17T12:40:52.973667Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql_1   | 2018-05-17T12:40:52.973671Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql_1   | 2018-05-17T12:40:52.973700Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql_1   | 2018-05-17T12:40:52.973705Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql_1   | 2018-05-17T12:40:52.973708Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql_1   | 2018-05-17T12:40:52.973712Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql_1   | 2018-05-17T12:40:52.973717Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql_1   | 2018-05-17T12:40:52.973721Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql_1   | 2018-05-17T12:40:52.973725Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql_1   | 2018-05-17T12:40:52.973729Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql_1   | 2018-05-17T12:40:52.973734Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql_1   | 2018-05-17T12:40:52.973820Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql_1   | 2018-05-17T12:40:52.973826Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql_1   | 2018-05-17T12:40:52.973833Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql_1   | 2018-05-17T12:40:52.973857Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql_1   | 2018-05-17T12:40:52.973859Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql_1   | 2018-05-17T12:40:52.973863Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql_1   | 2018-05-17T12:40:52.973869Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql_1   | 2018-05-17T12:40:52.973873Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql_1   | 2018-05-17T12:40:52.973875Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql_1   | 2018-05-17T12:40:52.973880Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql_1   | 2018-05-17T12:40:52.973931Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql_1   | 2018-05-17T12:40:52.973946Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql_1   | 2018-05-17T12:40:52.973949Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql_1   | 2018-05-17T12:40:52.973953Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql_1   | 2018-05-17T12:40:52.973956Z 0 [Note] Shutting down plugin 'InnoDB'
mysql_1   | 2018-05-17T12:40:52.974039Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql_1   | 2018-05-17T12:40:52.974238Z 0 [Note] InnoDB: Starting shutdown...
mysql_1   | 2018-05-17T12:40:53.075397Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:53.075663Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180517 12:40:53
mysql_1   | 2018-05-17T12:40:54.697441Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12358623
mysql_1   | 2018-05-17T12:40:54.700318Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1   | 2018-05-17T12:40:54.700356Z 0 [Note] Shutting down plugin 'MEMORY'
mysql_1   | 2018-05-17T12:40:54.700363Z 0 [Note] Shutting down plugin 'CSV'
mysql_1   | 2018-05-17T12:40:54.700369Z 0 [Note] Shutting down plugin 'sha256_password'
mysql_1   | 2018-05-17T12:40:54.700376Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql_1   | 2018-05-17T12:40:54.700531Z 0 [Note] Shutting down plugin 'binlog'
mysql_1   | 2018-05-17T12:40:54.703180Z 0 [Note] mysqld: Shutdown complete
mysql_1   |
mysql_1   |
mysql_1   | MySQL init process done. Ready for start up.
mysql_1   |
mysql_1   | 2018-05-17T12:40:54.998027Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1   | 2018-05-17T12:40:54.999152Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 1 ...
mysql_1   | 2018-05-17T12:40:55.001869Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1   | 2018-05-17T12:40:55.001934Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1   | 2018-05-17T12:40:55.001941Z 0 [Note] InnoDB: Uses event mutexes
mysql_1   | 2018-05-17T12:40:55.001947Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1   | 2018-05-17T12:40:55.001952Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1   | 2018-05-17T12:40:55.001957Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1   | 2018-05-17T12:40:55.002420Z 0 [Note] InnoDB: Number of pools: 1
mysql_1   | 2018-05-17T12:40:55.002520Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1   | 2018-05-17T12:40:55.003928Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1   | 2018-05-17T12:40:55.010034Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1   | 2018-05-17T12:40:55.011701Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1   | 2018-05-17T12:40:55.023389Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1   | 2018-05-17T12:40:55.032219Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1   | 2018-05-17T12:40:55.032310Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1   | 2018-05-17T12:40:55.120831Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1   | 2018-05-17T12:40:55.122318Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:55.122357Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1   | 2018-05-17T12:40:55.122688Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1   | 2018-05-17T12:40:55.173315Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 12358623
mysql_1   | 2018-05-17T12:40:55.173777Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1   | 2018-05-17T12:40:55.173781Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1   | 2018-05-17T12:40:55.177958Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1   | 2018-05-17T12:40:55.178003Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180517 12:40:55
mysql_1   | 2018-05-17T12:40:55.178203Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1   | 2018-05-17T12:40:55.180947Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1   | 2018-05-17T12:40:55.181021Z 0 [Note] IPv6 is available.
mysql_1   | 2018-05-17T12:40:55.181039Z 0 [Note]   - '::' resolves to '::';
mysql_1   | 2018-05-17T12:40:55.181058Z 0 [Note] Server socket created on IP: '::'.
mysql_1   | 2018-05-17T12:40:55.183184Z 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.
mysql_1   | 2018-05-17T12:40:55.185972Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186060Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186070Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186096Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186100Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.186114Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.189693Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.189741Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1   | 2018-05-17T12:40:55.195693Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1   | 2018-05-17T12:40:55.196031Z 0 [Note] mysqld: ready for connections.
mysql_1   | Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
prisma_1  | Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5002ms.
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
prisma_1  |     at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
prisma_1  |     at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
prisma_1  |     at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef.acquireSession(BasicBackend.scala:218)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef.acquireSession$(BasicBackend.scala:217)
prisma_1  |     at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
prisma_1  |     at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
prisma_1  |     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
prisma_1  |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
prisma_1  |     at java.lang.Thread.run(Thread.java:748)
prisma_1  | Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=mysql)(port=3306)(type=master) : Connection refused (Connection refused)
prisma_1  |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:161)
prisma_1  |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.connException(ExceptionMapper.java:79)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1040)
prisma_1  |     at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:490)
prisma_1  |     at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:144)
prisma_1  |     at org.mariadb.jdbc.Driver.connect(Driver.java:90)
prisma_1  |     at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101)
prisma_1  |     at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
prisma_1  |     at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
prisma_1  |     at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
prisma_1  |     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
prisma_1  |     ... 3 more
prisma_1  | Caused by: java.net.ConnectException: Connection refused (Connection refused)
prisma_1  |     at java.net.PlainSocketImpl.socketConnect(Native Method)
prisma_1  |     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
prisma_1  |     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
prisma_1  |     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
prisma_1  |     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
prisma_1  |     at java.net.Socket.connect(Socket.java:589)
prisma_1  |     at java.net.Socket.connect(Socket.java:538)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:398)
prisma_1  |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1032)
prisma_1  |     ... 14 more

It seems the server can't connect to the db.

Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5002ms.

prisma deploy returns the following.

Creating stage default for service default ✔
Deploying service `default` to stage `default` to server `local` 415ms

Changes:

  User (Type)
  + Created type `User`
  + Created field `id` of type `GraphQLID!`
  + Created field `name` of type `String!`
  + Created field `updatedAt` of type `DateTime!`
  + Created field `createdAt` of type `DateTime!`

Applying changes 1.1s

Your Prisma GraphQL database endpoint is live:

  HTTP:  http://localhost:4466
  WS:    ws://localhost:4466

Going to my localhost on port 4466 goes to the graphiql client and I can see the schema, but I get the error below in the output window.

{
  "errors": [
    {
      "message": "Project not found: 'graphiql@default'",
      "code": 3016,
      "requestId": "local:api:cjhaj6q6d001e0964ycf00iet"
    }
  ]
}

Here is the docker-compose file

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.8
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: mysql
            host: mysql
            port: 3306
            user: root
            password: prisma
            migrations: true
  mysql:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: prisma
    volumes:
      - mysql:/var/lib/mysql
volumes:
  mysql:

Sorry if I missed something, but I have tried this in a million different combinations.

Hmm, I am not sure what the problem is. I cannot reproduce it based on your descriptions.

Let me know if you learn more about this :slightly_smiling_face:

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marktani picture marktani  Â·  3Comments

hoodsy picture hoodsy  Â·  3Comments

dohomi picture dohomi  Â·  3Comments

marktani picture marktani  Â·  3Comments

nikolasburk picture nikolasburk  Â·  3Comments