Aws rds mysql connection issue from local nodejs application

0

while trying to connect aws mysql from nodejs application in my local windows 10 machine, getting following error

Error: ER_BAD_DB_ERROR: Unknown database 'mysqldatabasebane1' code: 'ER_BAD_DB_ERROR', errno: 1049, sqlMessage: "Unknown database 'mysqldatabasebane1' '", sqlState: '42000', fatal: true }

Also in my aws console i see database name is empty in one place.

Enter image description here

질문됨 일 년 전670회 조회
4개 답변
0

When creating RDS MySQL, if "Database Name" is not entered, the schema will not be created.
Connect to RDS MySQL and run the following command to create the schema.

CREATE DATABASE mysqldatabasebane1;
profile picture
전문가
답변함 일 년 전
0

Above will help. The problem was that as you did not specify it during creation, AWS will not create a database, so you ll have to do that later, as suggested above. Enter image description here

Hope it clarifies ;)

profile picture
전문가
답변함 일 년 전
0

I specified database name at the time of creation, the name is perfectly appearing on places like "DB identifier", "DB instance ID" etc.

if you look at the attached screenshot, you see the specified name "mysqldatabasebane1" in green color, but under "DB Name" label the name is not appearing.

while trying to connect from my local nodejs application, getting following error.

Error: ER_BAD_DB_ERROR: Unknown database 'mysqldatabasebane1' code: 'ER_BAD_DB_ERROR', errno: 1049, sqlMessage: "Unknown database 'mysqldatabasebane1' '", sqlState: '42000', fatal: true

when connecting local db, things are working fine.

Enter image description here

답변함 일 년 전
0

You have entered mysqldatabasebane1 in the "DB instance identifier" field.
Open the "Additional Settings" at the bottom of the creation and enter "mysqldatabasebane1" in the "First Database Name" field.
Then mysqldatabasebane1 is created

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인