C2W3A1 - Where are environment variables set?

Hello,

Can I get some more information on how the ${MYSQL_CONNECTION_STRING} is set?

Create the data source to represent the data available in the MySQL DB

mysql_datasource = context.sources.add_sql(
name=f"{LAB_PREFIX}-db-datasource", connection_string=“${MYSQL_CONNECTION_STRING}”
)

How are the environment variables provided? Is it included in the setup_jupyter_env.sh script?

I am getting an error when running this cell. Any ideas on why this is happening? I’ve tried with two different wifi networks.

Hello @gabyborja
The env variable MYSQL_CONNECTION_STRING is created in line 57 of the setup_jupyter_env.sh file:
image
If you can’t connect to the database, there might be a problem with the VPC configuration of the cloud9 environment. Can you please verify that you chose the correct VPC and subnet while creating the cloud9 environment and try again?