# C1W2,Lab1 - Unable to connect to Mysql endpoint

**URL:** <https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526>\
**Category:** Introduction to Data Engineering\
**Tags:** week-module-2, coursera-platform\
**Created:** [September 24, 2024, 10:10pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526 "2024-09-24T22:10:54Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![ajitgarlapati](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@ajitgarlapati](https://community.deeplearning.ai/u/ajitgarlapati)\
**Post date:** [October 18, 2024, 2:03pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/22 "2024-10-18T14:03:29Z")

</div>

Hi

I am still unable to connect to the mysql database

I have followed the instructions until being able to successfully install Terraform with this:  
source scripts/setup.sh

After that I enter this  
aws rds describe-db-instances --db-instance-identifier de-c1w2-rds --output text --query “DBInstances.Endpoint.Address”

After that I enter this and nothing comes up  
mysql [de-c1w2-rds.cz0yaeyom0yk.us-east-1.rds.amazonaws.com](http://de-c1w2-rds.cz0yaeyom0yk.us-east-1.rds.amazonaws.com) --user=admin --password=adminpwrd --port=3306

And i get this error:  
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Please help!

 ![Screenshot 2024-10-18 084849](https://global.discourse-cdn.com/dlai/original/3X/0/0/009e94e255bfe19447d3de2611f8a7429e58daec.png)

---

<div class="post-metadata">

**Author:** ![Georgios](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@Georgios](https://community.deeplearning.ai/u/Georgios)\
**Post date:** [October 18, 2024, 2:50pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/23 "2024-10-18T14:50:12Z")

</div>

Hello @ajitgarlapati,  
it should start with mysql --host=de-c1w2…com --user=admin --password=adminpwrd --port=3306  
Could you try adding --host and see if it fixes. Thank you

---

<div class="post-metadata">

**Author:** ![ajitgarlapati](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@ajitgarlapati](https://community.deeplearning.ai/u/ajitgarlapati)\
**Post date:** [October 18, 2024, 3:41pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/24 "2024-10-18T15:41:48Z")

</div>

Dear @Georgios

Yes I can solve my problem. Thank you very much for your support

---

<div class="post-metadata">

**Author:** ![suma\_deeplearn](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@suma\_deeplearn](https://community.deeplearning.ai/u/suma_deeplearn)\
**Post date:** [March 19, 2025, 2:55am UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/25 "2025-03-19T02:55:25Z")

</div>

HI all,

I get the same error I followed all instructions and this is the issue. Please help. Says access denied. I verified that the db status is accessible. What else should I do?

coder@2192cf1e9dd2:~/project$ mysql --host=[de-c1w2-rds.ctkaio0mi7o5.us-east-1.rds.amazonaws.com](http://de-c1w2-rds.ctkaio0mi7o5.us-east-1.rds.amazonaws.com) --user=admin --password=adminpwd --port=3306  
mysql: [Warning] Using a password on the command line interface can be insecure.  
ERROR 1045 (28000): Access denied for user ‘admin’@‘[ec2-50-16-135-185.compute-1.amazonaws.com](http://ec2-50-16-135-185.compute-1.amazonaws.com)’ (using password: YES)

---

<div class="post-metadata">

**Author:** ![suma\_deeplearn](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@suma\_deeplearn](https://community.deeplearning.ai/u/suma_deeplearn)\
**Post date:** [March 19, 2025, 3:09am UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/26 "2025-03-19T03:09:21Z")

</div>

Hi Jessica, Please help. I am getting the error as access denied while trying to connect to eh rds. Where exactly to find this cloud9 environment setting that you gave the snippedt? Here is the error:  
coder@2192cf1e9dd2:~/project$ mysql --host=[de-c1w2-rds.ctkaio0mi7o5.us-east-1.rds.amazonaws.com](http://de-c1w2-rds.ctkaio0mi7o5.us-east-1.rds.amazonaws.com) --user=admin --password=adminpwd --port=3306  
mysql: [Warning] Using a password on the command line interface can be insecure.  
ERROR 1045 (28000): Access denied for user ‘admin’@‘[ec2-50-16-135-185.compute-1.amazonaws.com](http://ec2-50-16-135-185.compute-1.amazonaws.com)’ (using password: YES)

---

<div class="post-metadata">

**Author:** ![Georgios](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@Georgios](https://community.deeplearning.ai/u/Georgios)\
**Post date:** [March 19, 2025, 12:57pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/27 "2025-03-19T12:57:28Z")

</div>

Hello @suma_deeplearn,

Sorry for the inconvenience, I am afraid Jessica-dlai has opted out from the Course a while ago. I could reproduce your issue, and I suggest skipping this part for now since you should be able to run the queries and complete the assignment in part 5 without any other issues. I will keep you updated once I have any info of resolving the error. Thank you

---

<div class="post-metadata">

**Author:** ![Georgios](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@Georgios](https://community.deeplearning.ai/u/Georgios)\
**Post date:** [March 19, 2025, 7:12pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/28 "2025-03-19T19:12:04Z")

</div>

Hello @suma_deeplearn

It looks like I made the same mistake, the password should be `adminpwrd`.  
You’ve used `adminpwd`, the `r` is missing. After that it should work, thank you

---

<div class="post-metadata">

**Author:** ![suma\_deeplearn](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@suma\_deeplearn](https://community.deeplearning.ai/u/suma_deeplearn)\
**Post date:** [March 19, 2025, 10:35pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/29 "2025-03-19T22:35:44Z")

</div>

Hi @gerogios . Thank you so much for correcting. I will try today.

---

<div class="post-metadata">

**Author:** ![lancepham](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lancepham](https://community.deeplearning.ai/u/lancepham)\
**Post date:** [April 11, 2025, 8:35pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/30 "2025-04-11T20:35:51Z")

</div>

tried all suggestions in threads above, rebooting the aws instance a few times, no success:coder@3dddd88047cf:~/project$ aws rds describe-db-instances --db-instance-identifier de-c1w2-rds --output text --query “DBInstances.Endpoint.Address”

Invalid endpoint: [https://rds](https://rds)..amazonaws.com

BUT had been successful getting through to 4.12 AWS Glue Job 24 hrs ago, so don’t know what happened. After 2 hours I guess AWS instance for lab gets cleared, but have always been successful getting back to the pipeline …

---

<div class="post-metadata">

**Author:** ![Georgios](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@Georgios](https://community.deeplearning.ai/u/Georgios)\
**Post date:** [April 11, 2025, 8:42pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/31 "2025-04-11T20:42:37Z")

</div>

Hello @lancepham,

There might be an issue with the lab exceeded limit since you could connect a day ago. Please submit this [form](https://forms.gle/S2gLNzQXZuMhBGwL6) for a lab refresh, note it takes 2 business days (no weekends) to complete. Hope it helps

---

<div class="post-metadata">

**Author:** ![lancepham](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lancepham](https://community.deeplearning.ai/u/lancepham)\
**Post date:** [April 11, 2025, 9:37pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/32 "2025-04-11T21:37:59Z")

</div>

Thanks, Georgios, I just logged the trouble ticket per your instruction. hope be able to get back to lab work asap. Love the course(!)

---

<div class="post-metadata">

**Author:** ![lancepham](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lancepham](https://community.deeplearning.ai/u/lancepham)\
**Post date:** [April 11, 2025, 9:42pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/33 "2025-04-11T21:42:43Z")

</div>

Thanks Georgios again for the quick response. Hope I can get back in it again, keep the “flow” of learning goin before work takes me away again. You guys are doing great work -

---

<div class="post-metadata">

**Author:** ![lancepham](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lancepham](https://community.deeplearning.ai/u/lancepham)\
**Post date:** [April 14, 2025, 9:50pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/34 "2025-04-14T21:50:26Z")

</div>

Thanks Georgios. After two days, I get the AWS instance back, finished the lab c1w2, got thru with jupyter output ending with the visual data ouputs from widget execution, and submitted, but keeps showing 0% completed. So I checked the saved file, outputs are there. I saved as another file name, still didn’t take the results. NOW i kicked out of AWS resource again.

 ![image.png](https://global.discourse-cdn.com/dlai/original/3X/0/5/057188c87dc7476194b39398eac7148d6cdb4ebc.png)

---

<div class="post-metadata">

**Author:** ![Georgios](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@Georgios](https://community.deeplearning.ai/u/Georgios)\
**Post date:** [April 14, 2025, 10:00pm UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/35 "2025-04-14T22:00:17Z")

</div>

Hello @hawraa.salami,

It seems @lancepham had his lab refreshed and could finish the lab but didn’t pass the grader. Now his issue continues, should he submit the form again. Thanks

---

<div class="post-metadata">

**Author:** ![hawraa.salami](https://avatars.discourse-cdn.com/v4/letter/h/41988e/32.png) [@hawraa.salami](https://community.deeplearning.ai/u/hawraa.salami)\
**Post date:** [April 15, 2025, 8:49am UTC](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526/36 "2025-04-15T08:49:53Z")

</div>

Thank you @Georgios for reaching out. I could see that the time limit budget has been exceeded, I already adjusted that. Please @lancepham try again the lab. And if you see that the grader still shows 0, please try to submit the assignment again. Please let us know if you’re still encountering the same issue.

[Previous page](https://community.deeplearning.ai/t/c1w2-lab1-unable-to-connect-to-mysql-endpoint/697526.md?page=1)
