question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFC: Add support for AWS RDS

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

[Nest] 50832   - 2/25/2018, 7:58:28 AM   [ExceptionHandler] ER_BAD_DB_ERROR: Unknown database 'test-db'
Error: ER_BAD_DB_ERROR: Unknown database 'test-db'
    at Handshake.Sequence._packetToError (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
    at Handshake.ErrorPacket (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/sequences/Handshake.js:130:18)
    at Protocol._parsePacket (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/Protocol.js:279:23)
    at Parser.write (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/Connection.js:103:28)
    at Socket.emit (events.js:160:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onread (net.js:602:20)
    --------------------
    at Protocol._enqueue (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/Protocol.js:145:48)
    at Protocol.handshake (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/protocol/Protocol.js:52:23)
    at PoolConnection.connect (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/Connection.js:130:18)
    at Pool.getConnection (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/mysql/lib/Pool.js:48:16)
    at /Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:518:18
    at new Promise (<anonymous>)
    at MysqlDriver.createPool (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:515:16)
    at MysqlDriver.<anonymous> (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:183:51)
    at step (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:32:23)
    at Object.next (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:13:53)
    at /Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:3:12)
    at MysqlDriver.connect (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/driver/mysql/MysqlDriver.js:167:16)
    at Connection.<anonymous> (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/connection/Connection.js:141:58)
    at step (/Users/iamclaytonray/github.com/iamclaytonray/std/std-server/node_modules/typeorm/connection/Connection.js:32:23)
 1: node::Abort() [/usr/local/bin/node]
 2: node::Chdir(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 3: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]
 4: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 5: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 6: 0x4c04d8042fd
/bin/sh: line 1: 50832 Abort trap: 6           node build/main.js
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'PRIVATE.us-east-1.rds.amazonaws.com',
      port: 3306,
      username: 'claytonray',
      password: 'password',
      database: 'test-db',
      entities: [__dirname + '/../**/*.entity{.ts,.js}'],
      synchronize: false,
    }),
  ],
})
export class DatabaseModule {}

Expected behavior

To support connections to RDS.

Minimal reproduction of the problem with instructions

I can provide a repro later.

What is the motivation / use case for changing the behavior?

RDS is a great way to manage databases. I would imagine plenty of people would love to see it supported.

Environment


Nest version: X.Y.Z

Yes, it is.

For Tooling issues:
- Node version: v9.5.0 
- Platform: Mac 10.13.3 

Others:

VS Code & Yarn

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chanlitocommented, Feb 25, 2018

From the error message it seems that the test-db doesn’t exists.

0reactions
lock[bot]commented, Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC common parameters - AMS Advanced User Guide
RFCs that create instances, such as an S3 bucket or an ELB, generally provide a schema that allows you to add up to...
Read more >
Creating an RFC - AMS Advanced User Guide
Navigate to the Create RFC page: In the left navigation pane of the AMS console click RFCs to open the RFCs list page,...
Read more >
RDS Database Stack | Create - AMS Advanced Change Type ...
Navigate to the Create RFC page: In the left navigation pane of the AMS console click RFCs to open the RFCs list page,...
Read more >
RDS Snapshot | Create - AMS Advanced Change Type ...
Navigate to the Create RFC page: In the left navigation pane of the AMS console click RFCs to open the RFCs list page,...
Read more >
RDS Database Stack | Update - AMS Advanced Change Type ...
Updating an RDS Stack with the Console · Navigate to the Create RFC page: In the left navigation pane of the AMS console...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found