meee — 2011-11-12T08:53:02-05:00 — #1
I am wondering if anybody knows it is possible to enable remote access to mysql on sharing host. Maybe with htaccess? Or any other way?
scallioxtx — 2011-11-13T09:35:57-05:00 — #2
The only way you can enable remote access to MySQL is through editing the MySQL server configuration (my.ini). Since shared hosts won't let you do this for obvious reasons you're out of luck.
Why do you want to do this? Several programs you can use on the desktop (like SQLYog or HeidiSQL) can also connect to a remote MySQL through an SSH tunnel, which is pretty easy to set up. You'd need SSH access for that of course.
Failing that, with SQLYog you can put a PHP script on the server and "connect" to that.
If all else fails there is of course PhpMyAdmin, but I would use that as a last resort only.
meee — 2011-11-13T10:02:13-05:00 — #3
The reason for that is because I don't have any database account in this hosting package. It is very cheap, and that is why it doesn't offer that. But I have another hosting provider where I have some databases left, but not any extra domains. I will later buy higher package and move everything to one provider, but not before I make some tests.
scallioxtx — 2011-11-13T10:04:40-05:00 — #4
So you want the host to connect to a MySQL database on your own PC or something?
meee — 2011-11-13T10:15:43-05:00 — #5
No, to another website. I have two websites, each one on different host. One host has no databases and nother has many databases, but not any domain left.
scallioxtx — 2011-11-13T10:33:16-05:00 — #6
Have you tried connecting to the MySQL on the remote host? If that didn't work I'm afraid you're out of luck. You could try to write an API and use that instead of connecting to MySQL directly, but does seems a bit overkill to me.
Have you contacted the host where you do have MySQL and ask if you could get an extra domain? They'd probably be willing to help you out.
timigoe — 2011-11-13T16:12:34-05:00 — #7
Its an option in the my.cnf / my.ini as has already been said - to either enable networking, or to bind to a certain IP address on the host. Most shared hosting providers SHOULD have this locked down (not internet accessible) so I'd guess you are probably out of luck there. Best solution is to upgrade your package so you can do what you need to without faffing. MySQL over the internet isn't the best for performance, especially if the servers are in different areas of the world (trust me... I've tried it, transatlantic, while migrating a website)
immerse — 2011-11-14T07:06:08-05:00 — #8
As an alternative, you might be able to use SimpleSQL on the the cheap server?
ldcdc — 2011-11-14T15:55:23-05:00 — #9
I am wondering if anybody knows it is possible to enable remote access to mysql on sharing host.
This should be possible via your hosting control panel (some hosts will not offer it though). Other than that, your best bet is to contact your host and ask for assistance.. or plea for a bit of understanding.
MySQL over the internet isn't the best for performance
Quite true. Given that Google now takes website load speed into account, it may be yet another reason to consider getting proper hosting for the site, if getting traffic to it is important.