# Cross-Account MySQL, is it possible?

**URL:** <https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463>\
**Category:** Hosting Support\
**Created:** [January 15, 2025, 2:27pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463 "2025-01-15T14:27:28Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jri-Creator](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/jri-creator/32/65654_2.png) [@Jri-Creator](https://forum.infinityfree.com/u/Jri-Creator)\
**Post date:** [January 15, 2025, 2:27pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/1 "2025-01-15T14:27:28Z")

</div>

### Website URL

[https://jmail.rf.gd](https://jmail.rf.gd), [https://reg.jri.rf.gd](https://reg.jri.rf.gd)

### Error Message

[No error]

### Other Information

I am not sure if it’s possible to perform cross-account MySQL connections. I have 3 accounts open, all of which have DBs. My website, JriMail, connects client-side to JriGlobali to provide information needed to connect to their JriMail account. I was wondering if it was possible to connect to the DB that’s on a seperate account, considering that it’s hosted on InfinityFree.

I want to improve the security of my JriMail service, and also keep the service running with little downtime. If it isn’t possible to cross-connect to MySQL DBs, that would decrease my uptime. I am switching from client-side transfer to server-side transfer because of a recent breach on my end, but I don’t want to bring the site offline for hours transfering DBs to one account.

---

<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:** [January 15, 2025, 2:41pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/2 "2025-01-15T14:41:40Z")

</div>

> [@Jri-Creator](#):
>
> I was wondering if it was possible to connect to the DB that’s on a seperate account, considering that it’s hosted on InfinityFree.

Unlikely,

> [@Connecting to MySQL from an external application](https://forum.infinityfree.com/t/connecting-to-mysql-from-an-external-application/49339/1):
>
> You cannot connect to a free hosting MySQL database from outside your hosting account.

---

<div class="post-metadata">

**Author:** ![dan3008](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/dan3008/32/53336_2.png) [@dan3008](https://forum.infinityfree.com/u/dan3008)\
**Post date:** [January 15, 2025, 4:11pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/3 "2025-01-15T16:11:52Z")

</div>

> [@Jri-Creator](#):
>
> perform cross-account MySQL connections

Following because I’m intrested in this too. Not holding my breath, but intrested

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [January 15, 2025, 4:32pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/4 "2025-01-15T16:32:54Z")

</div>

Give it a shot and see what happens.

My guess is not possible, but if the only software limitation is in localhost connections and there is no domain/username check, it might work.

---

<div class="post-metadata">

**Author:** ![dan3008](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/dan3008/32/53336_2.png) [@dan3008](https://forum.infinityfree.com/u/dan3008)\
**Post date:** [January 15, 2025, 5:30pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/5 "2025-01-15T17:30:11Z")

</div>

> [@Greenreader9](#):
>
> Give it a shot and see what happens.

I think I will when I get home. If I get in trouble I’m blaming you 😉 loo

---

<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:** [January 15, 2025, 8:52pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/6 "2025-01-15T20:52:09Z")

</div>

It’s possible, yes, but not officially supported or recommended.

Our database servers cannot be used from outside our hosting. But from within our hosting, any website server can connect to any database server.

As far as I know, account assignments to web servers and database servers is independent, meaning two different hosting accounts on the same web server might be assigned to two different database servers.

* * *

Of course, if you want to use a database from account A on account B, you’ll need to distribute the database credentials from account A to account B to work.

* * *

Be careful with this though. You wouldn’t be the first to try to migrate their website to a different account, only move the files but not the database, see that the site works (because of cross account DB access) and conclude that everything was successful.

But now the old account is not getting any web traffic, meaning it will get suspended for inactivity. But that will also disable the databases of that account, which breaks the website on the new account.

---

<div class="post-metadata">

**Author:** ![Jri-Creator](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/jri-creator/32/65654_2.png) [@Jri-Creator](https://forum.infinityfree.com/u/Jri-Creator)\
**Post date:** [January 15, 2025, 9:16pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/7 "2025-01-15T21:16:51Z")

</div>

> [@Admin](#):
>
> But now the old account is not getting any web traffic, meaning it will get suspended for inactivity. But that will also disable the databases of that account

All three of my accounts get a decent amount of traffic, so I wouldn’t see this being an issue for a while. I only need cross-database access for users to continue using my Services, while I back-up the JriGlobali DB and transfer it to the JriMail account to complete server-side verification.

If any issues were to arise, I can have my site “poke” [Goto site, site returns back] the account that hosted my DB before the transfer to keep it open. [For a while. After that if it closes, it closes.]

> [@Admin](#):
>
> Our database servers cannot be used from outside our hosting. But from within our hosting, any website server can connect to any database server.

Interesting. How would the servers know when an outsider is connecting, and when an insider is?

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [January 15, 2025, 10:24pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/8 "2025-01-15T22:24:08Z")

</div>

> [@Jri-Creator](#):
>
> How would the servers know when an outsider is connecting, and when an insider is?

Localhost vs external IP. Locking a database to only localhost connections is very common on a lot of production environments for security reasons.

---

<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:** [January 16, 2025, 9:28am UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/9 "2025-01-16T09:28:21Z")

</div>

> [@Jri-Creator](#):
>
> How would the servers know when an outsider is connecting, and when an insider is?

Why are you able to connect to a printer on your own WiFi network but the rest of the world isn’t able to do that? It’s because they are connected to the same local network. And because the local network is local, it’s not possible to connect to it from the outside world.

But even without an internal network, it can easily be done with firewall rules. Simply allow access from the web servers, and block everything else.

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [January 16, 2025, 3:30pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/10 "2025-01-16T15:30:20Z")

</div>

> [@Admin](#):
>
> Why are you able to connect to a printer on your own WiFi network but the rest of the world isn’t able to do that?

Unfortunately that argument is no longer valid, printers are very much accessible to the world and it’s and issue too:

> **[Open IPP Report – Exposed Printer Devices on the Internet | The Shadowserver...](https://www.shadowserver.org/news/open-ipp-report-exposed-printer-devices-on-the-internet/)**
>
> We have enabled a new scan dedicated to finding open IPP (Internet Printing Protocol) devices exposed on port 631/TCP. The roughly 80,000 devices uncovered as a result of the scan have connected to the Internet without adequate access controls or...

* * *

But Admin is right, a better example may be gaming, you can have a LAN network game, and a WLAN game. When you play a LAN game, only people on your own network can view it, people outside the network don’t have access to the game port, even if they know it (firewalls!). If your on a WLAN game, the router forwards the port out to open internet, so anyone with knowledge of the IP and port can access it.

---

<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:** [January 16, 2025, 5:05pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/11 "2025-01-16T17:05:00Z")

</div>

> [@Greenreader9](#):
>
> Unfortunately that argument is no longer valid, printers are very much accessible to the world and it’s and issue too:

The printers listed in that articles appear to be connected to the public internet, not a private network, so it doesn’t really count. But in retrospect, printers is still a bad argument with many modern printers having cloud printing functionality.

Chromecasts might be another example, but I’m not sure how familiar everyone is with those.

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [January 16, 2025, 5:43pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/12 "2025-01-16T17:43:02Z")

</div>

Chromecasts are exposed as well, remote control is a feature. One would hope that there would be much better security / less access vulnerabilities as it’s backed by Alphabet, but honestly who knows.

---

<div class="post-metadata">

**Author:** ![Jri-Creator](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/jri-creator/32/65654_2.png) [@Jri-Creator](https://forum.infinityfree.com/u/Jri-Creator)\
**Post date:** [January 16, 2025, 7:27pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/13 "2025-01-16T19:27:51Z")

</div>

I believe that Roku devices could be counted into this. The remote control feature could be accessed publicly, unless configured to only be visible on its network.

---

<div class="post-metadata">

**Author:** ![dan3008](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/dan3008/32/53336_2.png) [@dan3008](https://forum.infinityfree.com/u/dan3008)\
**Post date:** [January 16, 2025, 9:46pm UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/14 "2025-01-16T21:46:32Z")

</div>

> [@Jri-Creator](#):
>
> I believe that Roku devices could be counted into this

I have an older Roku, and the remote app only works if you’re on the same wifi as the roku

---

<div class="post-metadata">

**Author:** ![lovebug](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lovebug/32/57624_2.png) [@lovebug](https://forum.infinityfree.com/u/lovebug)\
**Post date:** [January 17, 2025, 12:07am UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/15 "2025-01-17T00:07:00Z")

</div>

I used to find googledorks interesting and was always amazed how many devices were connected to the internet often with the default login details unchanged 😛

---

<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:** [January 24, 2025, 12:07am UTC](https://forum.infinityfree.com/t/cross-account-mysql-is-it-possible/104463/16 "2025-01-24T00:07:20Z")

</div>

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