naruponk Posted May 21, 2011 Share Posted May 21, 2011 Hi, I am looking for the way to connect to mysql data base on a shared hosting My user's permission can connect from localhost only. How can I connect from my local PC ? Regards, Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/ Share on other sites More sharing options...
gizmola Posted May 21, 2011 Share Posted May 21, 2011 On shared hosting there is probably no chance they will allow this. It requires configuration to be done on the mysql server by the server admin. Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1218367 Share on other sites More sharing options...
The Little Guy Posted May 25, 2011 Share Posted May 25, 2011 On shared hosting there is probably no chance they will allow this. I am glad I have an awesome shared host then, because I can do it with my host Command line (putty or putty equivalent): mysql -h myser.myhost.com -u myusername --password=mypassword mydatabase -h: can either be domain, ip, or localhost -u: your mysql username --password=: yoru mysql password mydatabase is the default database to log into, this is optional if you don't know the -h parameter, contact your host. Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220104 Share on other sites More sharing options...
gizmola Posted May 25, 2011 Share Posted May 25, 2011 What does showing the mysql command line client help prove? Of course the command line client has the ability to connect to other servers built in. That doesn't mean that you can be on your local linux box and connect to the instance of mysql on a shared host. Usually when people request this it is not to use the mysql command line client, but rather to use a gui tool like sqlyog or mysql's tool. The mysql well known port is 3306. Very few shared hosting companies want to leave this open as it invites hacking attempts. The user credentials also need to specify the host. Most panels constrain the user to 'username@localhost'. In order to allow a connection from other hosts, that needs to be changed to either a wildcard or an ip or ip with wildcard, which is also a gaping invitation for exploiters. For this reason very few shared hosts do it. If in fact you have been able to connect from a different machine to your shared host, that is unusual, but I'm not sure for the reasons I stated, it actually indicates that they are "awesome". Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220240 Share on other sites More sharing options...
The Little Guy Posted May 25, 2011 Share Posted May 25, 2011 I can connect via mysql workbench to mine, is that the same.... Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220261 Share on other sites More sharing options...
gizmola Posted May 25, 2011 Share Posted May 25, 2011 Yes. Is this dreamhost? For people who strongly want this feature that could be a selling point. Are you sure you have shared hosting and not vps or dedicated? Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220264 Share on other sites More sharing options...
The Little Guy Posted May 25, 2011 Share Posted May 25, 2011 I do have dreamhost, and I have a shared server and a vps web server (not mysql). all my databases are on the shared server. I can also setup what ip's can connect from the remote address. I also have to set up a host, they don't allow you to use localhost. example: db.mysite.com Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220266 Share on other sites More sharing options...
gizmola Posted May 25, 2011 Share Posted May 25, 2011 It sounds to me like the "shared" server in this case is actually specifically a "mysql" server. That is understandable and would require the ability for different hosts to access it as clients. Most typical shared hosts have a bunch of machines and they have a shared lamp stack and a mysql that sits on each server. Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220270 Share on other sites More sharing options...
The Little Guy Posted May 25, 2011 Share Posted May 25, 2011 yeah, I have 8 servers in my shared hosting: - 1 Mysql Server - 1 Web Server - 1 Email Server - 5 File Servers Quote Link to comment https://forums.phpfreaks.com/topic/237035-how-can-i-connect-to-websites-mysql-from-local-pc/#findComment-1220279 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.