해결된 질문
24.05.03 03:45 작성
·
220
-1
Access denied for user 'root'@'localhost' (using password: YES)
my-backend-1 | Error: connect ECONNREFUSED 172.18.0.2:3306
my-backend-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16)
my-database-1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
my-backend-1 | [Nest] 42 - 05/02/2024, 6:41:50 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
my-backend-1 | Error: connect ECONNREFUSED 172.18.0.2:3306
my-backend-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16)
my-database-1 | 2024-05-02T18:41:49.714242Z 0 [System] [MY-015015] [Server] MySQL Server - start.
my-database-1 | 2024-05-02T18:41:50.845054Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1
my-database-1 | 2024-05-02T18:41:50.991351Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
my-database-1 | 2024-05-02T18:41:51.037335Z 1 [ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
my-database-1 | 2024-05-02T18:41:51.037785Z 1 [Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
my-database-1 | 2024-05-02T18:41:51.786685Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
my-backend-1 | [Nest] 42 - 05/02/2024, 6:41:53 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)...
my-backend-1 | Error: connect ECONNREFUSED 172.18.0.2:3306
my-backend-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16)
my-database-1 | 2024-05-02T18:41:53.236794Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
my-database-1 | 2024-05-02T18:41:53.237258Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
my-database-1 | 2024-05-02T18:41:53.247163Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
my-database-1 | 2024-05-02T18:41:53.454585Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
my-database-1 | 2024-05-02T18:41:53.793849Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
my-backend-1 | query: SELECT VERSION() AS version
my-backend-1 | query: START TRANSACTION
my-backend-1 | query: SELECT DATABASE() AS db_name
my-backend-1 | query: SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_COMMENT FROM INFORMATION_SCHEMA.`TABLES` WHERE TABLE_SCHEMA = 'mydocker' AND TABLE_NAME = 'board'
my-backend-1 | query: SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` WHERE TABLE_SCHEMA = 'mydocker' AND TABLE_NAME = 'typeorm_metadata'
my-backend-1 | query: CREATE TABLE board (`number` int NOT NULL AUTO_INCREMENT, writer varchar(255) NOT NULL, title varchar(255) NOT NULL, contents varchar(255) NOT NULL, PRIMARY KEY (`number`)) ENGINE=InnoDB
my-backend-1 | query: COMMIT
my-backend-1 | [Nest] 42 - 05/02/2024, 6:41:56 PM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +3294ms
my-backend-1 | [Nest] 42 - 05/02/2024, 6:41:56 PM LOG [GraphQLModule] Mapped {/graphql, POST} route +68ms
my-backend-1 | [Nest] 42 - 05/02/2024, 6:41:56 PM LOG [NestApplication] Nest application successfully started +3ms
안되네요??
답변 2
0
2024. 05. 06. 13:20
안녕하세요! 동호님!
해당 에러 메시지를 확인해 보니, Access denied for user 'root'@'localhost' (using password: YES)
라고 되어있는 부분이 보이네요!
해당 에러는 접근 권한이 없다는 뜻으로, docker 내의 mysql이 제대로 실행되고 있는지, 비밀번호가 알맞게 설정되어 있는지 등을 다시 한 번 점검해 주세요!
마지막으로, 도커 수업 이전에 local에서 mysql 수업을 진행하였었는데 docker 수업중에는 local 컴퓨터의 mysql은 종료해 주세요!
-1
2024. 05. 03. 04:07
[Nest] 42 - 05/02/2024, 7:03:11 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
my-backend-1 | Error: connect ECONNREFUSED 172.18.0.2:3306
my-backend-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16)