1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
【以下的回答经过翻译处理】 根据此答案,从脚本中删除“sudo”,因为用户数据脚本是以root用户身份运行的:
https://stackoverflow.com/questions/67740072/user-data-not-running-command-in-mysql
https://stackoverflow.com/questions/41603517/installing-mysql-client-on-ec2-via-cloudformation
还注意到,即使脚本中已经存在,EC2也会在脚本顶部添加“#!/bin/bash”
我的最终脚本:
yum -y update
# 添加MYSQL客户端以连接到RDS(MYSQL)实例。
yum -y install mysql
Contenus pertinents
- demandé il y a 10 mois
- demandé il y a 8 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an