geobop
07-04-2004, 09:28 AM
I've been pulling my hair out trying to learn PHP and MySQL, then getting everything published online and, more important, making it WORK online. I have had some successful exerperiments, but today I hit a brickwall while trying to import some tables with phpMyAdmin and realized it's time to find a new solution.
In fact, I have two solutions in mind: SSH tunneling and remote database connections.
I've been administering my MySQL databases as much as possible with Navicat, a program that's much easier to use than phpMyAdmin. I just discovered that you can use Navicat online, using a process called SHH tunneling - http://www.navicat.com/ssh_tunnel.php
I'd like to get some feedback from someone who has experience with SSH tunneling - especially if they've also used it with Navicat. Is this fairly easy to learn, or am I just jumping into another can of worms?
At the same time, I want to learn how to make a remote database connection, since one of my websites is much harder to work with than the other. Let's call them www.goodsite.org and www.badsite.org. I want both sites to connect with the database on www.goodsite.org.
I understand I have to go into www.goodsite.org's C-Panel and grant permission for a foreign host to access it. So I open up my C-Panel > MySQL and scroll to the bottom, where it says Access Hosts > Localhost.
I have to type in a value where it says Host (% wildcard is allowed). I understand I have to type in the other website's IP number, so I typed in something similar to 67.33.165.202. But I'm supposed to register TWO IP's if the website's IP address is different than the IP it's hosted on. So how do I type in two IP addreesses, something like this?:
"67.33.165.202, 72.33.126.177"
Another thing I noticed is that the IP address I type in doesn't register. When I typed in the URL - "www.badsite.org" - then clicked the "back" link, "www.badsite.org" was displayed under Access Hosts. But it never displays the IP address, so I can't tell if it's really registered or not.
If and when I solve that problem, I have to put a query that targets a remote database on www.badsite.org. I assume I would use the same password, username and database name that I use on www.goodsite.org, except that I have mark it as a remote connection. Do either of the following queries look correct, or do I have to add "http://" or make some other change?
@mysql_connect ("www.goodsite.org" , "USERNAME" , "PASSWORD");
@mysql_select_db ("DATABASE");
$dbExternal = @mysql_connect ("www.goodsite.org" , "USERNAME" , "PASSWORD");
@mysql_select_db ("DATABASE", $dbExternal);
Finally, I read that many hosts don't allow remote database connections because it's a big security issue. Is that true? If so, what are some safeguards I can use to protect myself from hackers, Microsoft, etc.?
Thanks!
In fact, I have two solutions in mind: SSH tunneling and remote database connections.
I've been administering my MySQL databases as much as possible with Navicat, a program that's much easier to use than phpMyAdmin. I just discovered that you can use Navicat online, using a process called SHH tunneling - http://www.navicat.com/ssh_tunnel.php
I'd like to get some feedback from someone who has experience with SSH tunneling - especially if they've also used it with Navicat. Is this fairly easy to learn, or am I just jumping into another can of worms?
At the same time, I want to learn how to make a remote database connection, since one of my websites is much harder to work with than the other. Let's call them www.goodsite.org and www.badsite.org. I want both sites to connect with the database on www.goodsite.org.
I understand I have to go into www.goodsite.org's C-Panel and grant permission for a foreign host to access it. So I open up my C-Panel > MySQL and scroll to the bottom, where it says Access Hosts > Localhost.
I have to type in a value where it says Host (% wildcard is allowed). I understand I have to type in the other website's IP number, so I typed in something similar to 67.33.165.202. But I'm supposed to register TWO IP's if the website's IP address is different than the IP it's hosted on. So how do I type in two IP addreesses, something like this?:
"67.33.165.202, 72.33.126.177"
Another thing I noticed is that the IP address I type in doesn't register. When I typed in the URL - "www.badsite.org" - then clicked the "back" link, "www.badsite.org" was displayed under Access Hosts. But it never displays the IP address, so I can't tell if it's really registered or not.
If and when I solve that problem, I have to put a query that targets a remote database on www.badsite.org. I assume I would use the same password, username and database name that I use on www.goodsite.org, except that I have mark it as a remote connection. Do either of the following queries look correct, or do I have to add "http://" or make some other change?
@mysql_connect ("www.goodsite.org" , "USERNAME" , "PASSWORD");
@mysql_select_db ("DATABASE");
$dbExternal = @mysql_connect ("www.goodsite.org" , "USERNAME" , "PASSWORD");
@mysql_select_db ("DATABASE", $dbExternal);
Finally, I read that many hosts don't allow remote database connections because it's a big security issue. Is that true? If so, what are some safeguards I can use to protect myself from hackers, Microsoft, etc.?
Thanks!
