C2_W1_Lab_1
I am unable to load connection to the MYSQL database. The variables defined in the src/env file are not showing DBHOST, DBUSER and DBPASSWORD. What information should i use to connect please.
Hello @PK05
The reason some variables like DBHOST
and DBUSER
are empty is that the MySQL database is deployed on the same server you are running the notebook on. If you want to connect manually, you can open a terminal and run mysql
as a command, and it will work. However, you don’t need to do so. If the following cell runs without hitting an exception, it means the connection is healthy.
@Amir_Zare thanks for your response. Below is what i am getting
@PK05 Are you running the .env
file as a python executable? You should go through the lab by following the instructions in the C2_W1_Lab_1_SQL.ipynb
file and running its cells one by one.
@Amir_Zare the instructions that I see are below
This doesn’t tell me much on how to establish the connection? On the src/file I have information on DBPORT and DBNAME and not much else. Please share a step by step action on how to establish a connection. I’m new at this and a dummies guide would be great Many thanks
@PK05 I guess the comma in the sentence is misleading you. You just need to run the following cell to establish the connection. The cell exactly under the part you took a screenshot of needs to be run. You can do so by choosing the cell and pressing shift + enter
.