Remote MySQL Connections
Posted by: Sinthed (---.hsd1.in.comcast.net)
Date: August 17, 2014 04:33AM

I have a website hosted through interserver.com, and would like this website to be able to connect to my mysql database hosted on my computer through Wamp. How would I go about allowing a connection and adding a password?

Thanks.

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Otomatic (Moderator)
Date: August 17, 2014 09:55AM

Hi,

Impossible.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 17, 2014 04:35PM

Can you explain what you are trying to achieve, maybe we can suggest a batter solution.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Sinthed (---.hsd1.in.comcast.net)
Date: August 17, 2014 04:38PM

I have a website, hosted through interserver.com, and using PHP I would like this website be able to connect to a database that is hosted on my computer through WAMP. I've already created a new user with % for the host, all privileges, and a password, and I am personally able to connect to it via my IP+Port, then entering the information. But the Website doesn't make the connection (maplestory.kisagames.com).

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 17, 2014 04:48PM

No I mean tell us why you think you want to do such an odd thing.

I get what you want to do just not why you would possibly want to. What are you trying to achieve?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Sinthed (---.hsd1.in.comcast.net)
Date: August 17, 2014 04:51PM

Why is that relevant? I cant find a host that can support my needs with a database, so I have to locally host it. And I still need the website to be able to access the DB to do things such as registering, supporting a 'rankings' page, and such nonsense.

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 17, 2014 05:03PM

Because thats what I thought you wanted to do and that is a dumb idea.

I have never used interserver.com but a quick look showed that their hosting packages have unlimited MySQL databases so use one that comes with your hosting package.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Sinthed (---.hsd1.in.comcast.net)
Date: August 17, 2014 05:32PM

As I already said, I believe twice?, is that my SQL needs are not satisfied by their server. I would need a 24/7 non-stop connection, without any timeouts. If you do not request or send any data for longer then 15 minutes on any connection, they time you out. This would require me to restart the server, which I cannot do everytime this happens.

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Otomatic (Moderator)
Date: August 17, 2014 05:46PM

Hi,

> I have a website, hosted through interserver.com, and using PHP I would like this website
> be able to connect to a database that is hosted on my computer through WAMP.
No host will give you the necessary permissions to connect to MySQL on a database other than those related to your site hosted by them.
And if you find one that allows this, I advise you to flee ; he has only vague notions of what constitutes security.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 17, 2014 06:26PM

As I have said, I believe twice now? That is an incredibly dumb idea, and as Oto has said it is VERY unlikely that a host woudl allow this to happen.

I cannot imagine what you actually mean when you say

If you do not request or send any data for longer then 15 minutes on any connection, they time you out.

And why that would require a server restart totally escapes me. I am sure you must be getting confused but if not, then you need to move your hosting package to a host that suites your needs.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Sinthed (---.hsd1.in.comcast.net)
Date: August 17, 2014 06:32PM

Any host will time a SQL connection out after a set amount of time if no activity is found, and no hosts would turn this one due to a security issue.

Now knowing this, I dont give a shit what your opinions are, I truly don't.

I would just like to allow a website using PHP to connect to my database hosted on my computer.

Its really not that hard of a question, and no answer's I have found on the internet have solved it.

For the love of god, stop recommending me alternate solutions, I have tried more then you know.

Just answer, the damn, question.

P.S. if your going to try and recommend a alternate solution, at least understand the problem so your offering a good idea, not a useless waste of my time.

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: Otomatic (Moderator)
Date: August 17, 2014 07:10PM

Hi,

> Its really not that hard of a question, and no answer's I have found on the internet have solved it.

There are times when I feel I could be rude.

You will not find the answer, because there is none. It is not possible.

Any command like:
mysqli_connect($db_host, $db_username, $db_password, $db_name)
is doomed to failure from the moment of $db_host does not match the host mysql of your webhost.
It is even much simpler than that, the host ignores the $db_host parameter and automatically connect to the mysql host corresponding at the hosting of your site.
And for many of the shared hoster that affect automatically database name, they only need password, all other parameters are ignored.

The only thing you could do is run a script in a iframe. The script would launch a hosted Wamp script and results will be in the iframe with, again, unable to get into the main script.

--------------------------
Be impolite and rude will not change the answers that might be given to you.
Do not continue this way or I totally eliminates this discussion. I think RiggsFolly and I were very patient and polite, maybe even too much.
An apology would be appreciated.



Edited 1 time(s). Last edit at 08/17/2014 07:40PM by Otomatic.

Options: ReplyQuote
Re: Remote MySQL Connections
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 17, 2014 08:00PM

WHAT HE SAID !

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.