# Cant conenc to mysqli db

**URL:** <https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834>\
**Category:** Hosting Support\
**Created:** [April 27, 2024, 7:44am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834 "2024-04-27T07:44:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon69270872](https://forum.infinityfree.com/letter_avatar/anon69270872/32/6_22734026db12803ebb3e059622ac3534.png) [@anon69270872](https://forum.infinityfree.com/u/anon69270872)\
**Post date:** [April 27, 2024, 7:44am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/1 "2024-04-27T07:44:47Z")

</div>

### Website URL

(please specify the URL of the site on which you are experiencing the problem)

### Error Message

(please share the FULL error message you see, if applicable)

**Warning** : mysqli\_connect(): php\_network\_getaddresses: getaddrinfo for [sql304.infinityfree.com](http://sql304.infinityfree.com) failed: No address associated with hostname in **/home/runner/MiniatureGrubbyBruteforceprogramming/index.php** on line **13**

**Fatal error** : Uncaught mysqli\_sql\_exception: php\_network\_getaddresses: getaddrinfo for [sql304.infinityfree.com](http://sql304.infinityfree.com) failed: No address associated with hostname in /home/runner/MiniatureGrubbyBruteforceprogramming/index.php:13 Stack trace: #0 /home/runner/MiniatureGrubbyBruteforceprogramming/index.php(13): mysqli\_connect(‘sql304.infinity…’, ‘if0\_36437274’, Object(SensitiveParameterValue), ‘\n if0\_3643…’) #1 {main} thrown in **/home/runner/MiniatureGrubbyBruteforceprogramming/index.php** on line **13**

### Other Information

My Code:

```auto

<html>
  <head>
    <title>PHP Test</title>
  </head>
  <body>
    <?php
    $host = "sql304.infinityfree.com";
    $username = "if0_36437274";
    $password = "HIDDEN BY MOD" ;
    $dbname = "
      if0_36437274_chatapp";

    $conn = mysqli_connect($host, $username, $password, $dbname);

    echo "conn";
?>
</html>

```

please resolve my issue as soon as possible

---

<div class="post-metadata">

**Author:** ![anon69270872](https://forum.infinityfree.com/letter_avatar/anon69270872/32/6_22734026db12803ebb3e059622ac3534.png) [@anon69270872](https://forum.infinityfree.com/u/anon69270872)\
**Post date:** [April 27, 2024, 7:45am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/2 "2024-04-27T07:45:32Z")

</div>

sorry the link is

shabbirnmapurwala[dot]great-site[dot]net

---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [April 27, 2024, 7:53am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/3 "2024-04-27T07:53:03Z")

</div>

Unlisted on April 27, 2024, 7:53am UTC



---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [April 27, 2024, 7:54am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/4 "2024-04-27T07:54:41Z")

</div>

You shared your password publicly !

Change it to something else following this procedure

![1](https://forum-cdn.infinityfree.net/original/3X/d/5/d5aaec24d38d8e0a6c8b1b4ed02111e1c87af59a.jpeg)

![2](https://forum-cdn.infinityfree.net/original/3X/3/8/38bfaac4d39cd073ab413fb223c79913f8d30054.jpeg)

![3](https://forum-cdn.infinityfree.net/original/3X/3/4/341b8a30a25cc00dfe413f7b3435e523c97bb055.jpeg)

---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [April 27, 2024, 8:00am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/5 "2024-04-27T08:00:28Z")

</div>

Listed on April 27, 2024, 8:00am UTC



---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [April 27, 2024, 8:13am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/6 "2024-04-27T08:13:32Z")

</div>

> [@anon69270872](#):
>
> ameterValue), ‘\n if0\_3643…’)

looks like you have a new line here `\n`  
and you must not have any space

![image](https://forum-cdn.infinityfree.net/original/3X/7/3/73e951c69386faab23b4a00d33fa83ed8a4e42b8.png)

---

<div class="post-metadata">

**Author:** ![Meishin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/meishin/32/59902_2.png) [@Meishin](https://forum.infinityfree.com/u/Meishin)\
**Post date:** [April 27, 2024, 8:15am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/7 "2024-04-27T08:15:19Z")

</div>

> [@anon69270872](#):
>
> /home/runner/MiniatureGrubbyBruteforceprogramming/index.php

Remote DB connection is disabled on free hosting.

> [@Connecting to MySQL from an external application](https://forum.infinityfree.com/t/connecting-to-mysql-from-an-external-application/49339):
>
> 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…

Try debugging directly on your actual website instead.

---

<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:** [April 27, 2024, 8:51am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/8 "2024-04-27T08:51:33Z")

</div>

I have reset your hosting account password.

Please remember that this is a publicly accessible forum, which means all posts here are visible for everyone to see. So make sure that you do not publish any sensitive data here, like passwords.

Feel free to change it again if you want, just don’t reuse the previous password, because it’s compromised. You will likely have to update your code to use the new password.

---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [April 27, 2024, 10:16am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/9 "2024-04-27T10:16:52Z")

</div>

btw. why such a username?

---

<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:** [May 4, 2024, 10:17am UTC](https://forum.infinityfree.com/t/cant-conenc-to-mysqli-db/92834/10 "2024-05-04T10:17:33Z")

</div>

Closed on May 4, 2024, 10:17am UTC

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