# MySQL hostname sql206.infinityfree.com does not resolve — error 2002

**URL:** <https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178>\
**Category:** Hosting Support\
**Created:** [October 9, 2026, 6:09am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178 "2026-10-09T06:09:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NguyenCKVN2026](https://forum.infinityfree.com/letter_avatar/nguyenckvn2026/32/6_449c533f586939b6e5f246632a46421f.png) [@NguyenCKVN2026](https://forum.infinityfree.com/u/NguyenCKVN2026)\
**Post date:** [October 9, 2026, 6:09am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/1 "2026-10-09T06:09:12Z")

</div>

### Website URL

[https://chungkhoanvn.42web.io/](https://chungkhoanvn.42web.io/)

### Error Message

Hello,

My hosting account:

- Account: if0\_43070057
- Domain: [chungkhoanvn.42web.io](http://chungkhoanvn.42web.io)
- Database: if0\_43070057\_chungkhoanvn

My vPanel shows this MySQL hostname:  
[sql206.infinityfree.com](http://sql206.infinityfree.com)

My PHP application returns this error:

SQLSTATE[HY000] [2002] php\_network\_getaddresses: getaddrinfo for [sql206.infinityfree.com](http://sql206.infinityfree.com) failed: No such host is known.

I checked this hostname using Google DNS, Cloudflare DNS, and my ISP DNS. None returned an A record or CNAME.

Could you please check whether this MySQL server has a DNS issue or has been moved, and confirm the correct hostname for my account?

Thank you.

### Other Information

I have already checked my PHP configuration and confirmed that the database hostname shown in vPanel is [sql206.infinityfree.com](http://sql206.infinityfree.com).

The hostname does not resolve through Google DNS, Cloudflare DNS, or my ISP DNS.

Please help confirm whether this is a DNS issue and provide the correct MySQL hostname if it has changed.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [October 9, 2026, 6:09am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/2 "2026-10-09T06:09:12Z")

</div>

Welcome to the InfinityFree community forum! Good to have you here.

- Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
- Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
- AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
- Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

---

<div class="post-metadata">

**Author:** ![Lemni](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lemni/32/68303_2.png) [@Lemni](https://forum.infinityfree.com/u/Lemni)\
**Post date:** [October 9, 2026, 6:09am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/3 "2026-10-09T06:09:27Z")

</div>

_Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look._

Your account’s MySQL host is sql206, so the hostname you have is the right one for this account. I can’t tell from the topic why it fails, so I have two questions.

Is the PHP script running on your InfinityFree site (the [chungkhoanvn.42web.io](http://chungkhoanvn.42web.io) address), or on your own computer or another host? The error is the same either way, but the cause is different, and your DNS checks only tell us what your own network sees. Where did you see the error: on the live site, or when running the code locally?

Also, can you paste the line in your code where the hostname is set? Another user got this exact “getaddrinfo failed” error even though the hostname looked correct. The cause was a trailing space inside the quoted hostname string in the code:

> [@Cant Connect to my MySql Database](https://forum.infinityfree.com/t/cant-connect-to-my-mysql-database/77918):
>
> Website [http://my-test-website.infinityfreeapp.com/test.php](http://my-test-website.infinityfreeapp.com/test.php)Error Message Connection failed: php\_network\_getaddresses: getaddrinfo failed: Name or service not known Other Information Hi There, I am trying to connect to my mysql database from my php script called test.php. I have tried both mysql hostname: sql110.epizy. com and sql110.infinityfree. com. The password is the one created when click the show/hide button. I add spaces to the two hostname urls to bypass the topic posting system \<?…

It might not be your problem, but your post can’t rule it out. Your code line would show whether the hostname has extra characters.

I found nothing that says the sql206 hostname has moved or has a DNS fault. If the script runs on your InfinityFree site and the hostname in the code is exactly `sql206.infinityfree.com` with no stray characters, then a person needs to look at this one.

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [October 9, 2026, 6:18am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/4 "2026-10-09T06:18:32Z")

</div>

> [@NguyenCKVN2026](#):
>
> I checked this hostname using Google DNS, Cloudflare DNS, and my ISP DNS. None returned an A record or CNAME

This is expected. You can only access it through hosting account. This could apply

> [@Connecting to MySQL from an external application](https://forum.infinityfree.com/t/connecting-to-mysql-from-an-external-application/49339/1):
>
> Sometimes, you may want to connect to your MySQL database on your free hosting account using external software, like a desktop database manager (like MySQL Workbench) or an external program you wrote yourself (like an Android or iOS app). You cannot connect to a free hosting MySQL database from outside your hosting account. You can only interact with your free hosting database through PHP scripts uploaded to your free hosting account, or through our phpMyAdmin installation. The ability to con…

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [October 9, 2026, 9:36am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/5 "2026-10-09T09:36:07Z")

</div>

I checked your account and I saw you uploaded a little database connection script. I access it, and it said everything was fine: the database hostname resolved, and the database connection was successful.

So that works as intended.

If you’re trying to access it from outside of our hosting, that’s not possible, like @KangJL already said.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [October 16, 2026, 9:36am UTC](https://forum.infinityfree.com/t/mysql-hostname-sql206-infinityfree-com-does-not-resolve-error-2002/121178/6 "2026-10-16T09:36:19Z")

</div>

Closed on October 16, 2026, 9:36am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
