Not able to install MYSQL on EC2

0

New to AWS, i have installed a EC2 instance (in Amazon Linux 2023 eng) and using EC2 Instance Connect, i have connected to the instance. Also trying to install the MySQL in the server to be able to connect to RDS. Command which i am using:

mysql -bash: mysql: command not found

sudo yum install mysql -y

Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached

Ignoring repositories: amazonlinux, kernel-livepatch No match for argument: mysql Error: Unable to find a match: mysql

2개 답변
0
수락된 답변

AL2023 is bundled with MariaDB 10.5. To install

sudo dnf install mariadb105-server

Root login in mariadb 10.4.3 and higher uses unix_socket. To connect

sudo mysql -uroot -p

Press enter when prompt for password

Also, this error Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached indicates network connectivity errors to yum repository. Are you able to access internet from EC2 instance? You need to fix this, i.e. able to ping and connect to the internet, e.g.

%% ping al2023-repos-us-east-1-de612dc2.s3.dualstack.us-east-1.amazonaws.com
PING s3-r-w.dualstack.us-east-1.amazonaws.com (52.217.82.176) 56(84) bytes of data.
64 bytes from s3-us-east-1-r-w.amazonaws.com (52.217.82.176): icmp_seq=1 ttl=221 time=226 ms
64 bytes from s3-us-east-1-r-w.amazonaws.com (52.217.82.176): icmp_seq=2 ttl=221 time=226 ms

Check your EC2 security group and associated route table. The article Why can't my Amazon EC2 instance connect to the internet using an internet gateway? may help.

AWS
전문가
Mike_L
답변함 7달 전
profile pictureAWS
전문가
검토됨 7달 전
0

Thanks for the response,

But i'm still getting the response as below:

Amazon Linux 2023 repository 0.0 B/s | 0 B 06:00

Errors during downloading metadata for repository 'amazonlinux':

Curl error (28): Timeout was reached for https://xxxxxxxxxxxxx.us-east-1.amazonaws.com/core/mirrors/2023.2.20231002/x86_64/mirror.list [Connection timeout after 30000 ms] Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://xxxxxxxxxxxxxx.us-east-1.amazonaws.com/core/mirrors/2023.2.20231002/x86_64/mirror.list [Connection timeout after 30000 ms] Amazon Linux 2023 Kernel Livepatch repository 0.0 B/s | 0 B 06:00 Errors during downloading metadata for repository 'kernel-livepatch': Curl error (28): Timeout was reached for https:/xxxxxxxxxxxxxxxxxxx.us-east-1.amazonaws.com/kernel-livepatch/mirrors/al2023/x86_64/mirror.list [Connection timeout after 30000 ms] Error: Failed to download metadata for repo 'kernel-livepatch': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://xxxxxxxxxxxxx.amazonaws.com/kernel-livepatch/mirror

Ignoring repositories: amazonlinux, kernel-livepatch No match for argument: mariadb105-server Error: Unable to find a match: mariadb105-server

Venkat
답변함 7달 전
  • the message "Curl error (28): Timeout was reached" indicates internet connectivity issue. Check that your EC2 instance can reach the internet as per my updated post

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

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

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

관련 콘텐츠