View Full Version : Accessing MySQL off the server
nsr81
10-03-2001, 11:51 AM
Is it possible to access MySQL from other places than localhost.
I have Apache/PHP setup at my computer to test my php scripts locally. So is there a way for me to access mysql for these scripts without installing mysql server and replicating the database on my computer.
reuben
10-03-2001, 12:55 PM
Sadly it isn't possible.
terrencebrown
10-14-2001, 09:12 PM
I don't know if this note from MySQL.com will work but I hope it sheds light.
Here is a note about how to connect to get a secure connection to remote MySQL server with SSH (by David Carlson dcarlson@mplcomm.com):
* Install an SSH client on your Windows machine. As a user, the best non-free one I've found is from SecureCRT from http://www.vandyke.com/. Another option is f-secure from http://www.f-secure.com/. You can also find some free ones on Google at http://directory.google.com/Top/Computers/Security/Products_and_Tools/Cryptography/SSH/Clients/Windows/.
* Start your Windows SSH client. Set Host_Name = yourmysqlserver_URL_or_IP. Set userid=your_userid to log in to your server (probably not the same as your MySQL login/password.
* Set up port forwarding. Either do a remote forward (Set local_port: 3306, remote_host: yourmysqlservername_or_ip, remote_port: 3306 ) or a local forward (Set port: 3306, host: localhost, remote port: 3306).
* Save everything, otherwise you'll have to redo it the next time.
* Log in to your server with SSH session you just created.
* On your Windows machine, start some ODBC application (such as Access).
* Create a new file in Windows and link to MySQL using the ODBC driver the same way you normally do, EXCEPT type in localhost for the MySQL host server -- not yourmysqlservername.
You should now have an ODBC connection to MySQL, encrypted using SSH.
pufferfish
06-05-2002, 04:10 AM
Why is it that way? Why can't we access the mySQL server remotely?
becca
06-05-2002, 04:34 PM
Nasir, a question on using the apache/php/mysql. I've had them for a while and surprisingly even have them working lol. My thing is, I'm trying to learn Ultradev with the PHP extension on it, which allows me to use php in it. It's supposed to allow for live data updates, mainly for checking codes before uploading. Even without using Ultradev tho, how do you use the apache/php/mysql to check your code. I figured how to build the database in mysql now. To get it to use the apache server on my hd, do the pages have to be saved in the phpdev folder? My sites are built on my hd first thru Dreamweaver, but not in with phpdev. I would hate to have to duplicate pages just to try them before uploading.
Hope that's not too confusing. Any help is greatly appreciated.
becca
nsr81
06-05-2002, 05:54 PM
pufferfish dug up an old thread from the time period when I was new to 100megs :D If you see the date, this thread was started on 10-03-2001.
As to how I do my testing. I develop everything offline, on my computer. I have Apache,PHP 4.1.2 and MySQL installed on my PC on which I develop all the code and database structure. I use Dreamwear 4.0 for HTML and EditPlus 2 for PHP and for making small modification to Dreamweaver generated HTML code. Pico is editor of choice for doing light editing on the server through SSH. If some thing drastic needs to be done, I'd rather download the file, edit and reupload it.
My method does generate duplicates of all the pages, but I find it most effective because, 1) I can't screw up the server, if my code is severly blotted. 2) I always have synchronized backup of everything. Should I lose the site on the server, or on my PC, I still retain one copy on either place. But that's just me :)
redcircle
06-05-2002, 10:02 PM
That sounds like my method also..
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.