2026, 새로운 도약을 시작합니다.

라이트세일 스냅샷 으로 인스턴트 생성 하니까 mysql 오류가 뜹니다. 채택완료

접속하면 Connect Error: Connection refused 이라고 뜨고

cli로 mysql 명령어를 입력하면


bitnami@ip-172-26-14-131:~/htdocs$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/bitnami/mysql/tmp/mysql.sock' (111)
 

라고 뜨고

phpmyadmin 에 접속하면 mysqli::real_connect(): (HY000/2002): Connection refused 라고 뜹니다..

bitnami@ip-172-26-14-131:~/htdocs$ sudo /opt/bitnami/ctlscript.sh status
apache already running
mysql already running
php-fpm already running

bitnami@ip-172-26-14-131:~/htdocs$ ps -ef | grep mysql
bitnami   3493  1489  0 07:41 pts/0    00:00:00 grep mysql
 

프로세스에 mysql이 없습니다.

2021-07-12T06:46:16.745586Z 0 [System] [MY-013169] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) initializing of server in progress as process 1188
2021-07-12T06:46:16.761369Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-12T06:46:16.761380Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-12T06:46:16.817779Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-12T06:46:17.962445Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-12T06:46:20.433744Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2021-07-12T06:46:24.994641Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 1238
2021-07-12T06:46:25.001278Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-12T06:46:25.001291Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-12T06:46:25.016398Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-12T06:46:25.457199Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-12T06:46:25.782892Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-07-12T06:46:26.054397Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-07-12T06:46:26.055117Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-07-12T06:46:26.190709Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
2021-07-12T06:46:26.927078Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-07-12T06:46:28.343905Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-07-12T06:46:29.313165Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 1332
2021-07-12T06:46:29.318710Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-12T06:46:29.318722Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-12T06:46:29.337625Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-12T06:46:29.702532Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-12T06:46:29.896509Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-07-12T06:46:29.920627Z 4 [System] [MY-013381] [Server] Server upgrade from '80023' to '80023' started.
2021-07-12T06:46:42.149362Z 4 [System] [MY-013381] [Server] Server upgrade from '80023' to '80023' completed.
2021-07-12T06:46:42.539802Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-07-12T06:46:42.540019Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-07-12T06:46:42.662119Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
2021-07-12T06:46:43.081412Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-07-12T06:46:45.483343Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-07-12T06:46:48.618772Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 1416
2021-07-12T06:46:48.627081Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-12T06:46:48.627094Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-12T06:46:48.647862Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-12T06:46:49.031736Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-12T06:46:49.224994Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-07-12T06:46:49.340293Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-07-12T06:46:49.340489Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-07-12T06:46:49.380598Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
2021-07-13T06:40:43.976585Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-07-13T06:40:47.822836Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-07-13T06:41:56.087427Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 1517
2021-07-13T06:41:56.103508Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-13T06:41:56.103522Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-13T06:41:56.165812Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-13T06:41:56.816620Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-13T06:41:57.196658Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-07-13T06:41:57.491270Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-07-13T06:41:57.491490Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-07-13T06:41:57.552940Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
2021-07-13T06:44:28.860497Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-07-13T06:44:29.741779Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-07-13T06:45:27.878444Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 1072
2021-07-13T06:45:27.895069Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-07-13T06:45:27.895082Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-07-13T06:45:27.963332Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-07-13T06:45:28.582001Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-07-13T06:45:28.955102Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-07-13T06:45:29.091536Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-07-13T06:45:29.091732Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-07-13T06:45:29.146873Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
 

해결 방법이 있을까요??

답변 1개

mysqld를 시작하셔야 하는 거 아닌가요?

sentOS에서는

# service mysql start

같은 명령어를 이용합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고