Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tektonnic

macrumors 6502
Original poster
Mar 6, 2006
336
0
Bucks, UK
Hi All,

I set up an Apache and MySQL on a Windows 2000 server in my house, now i want to use OS X to edit MYSQL through terminal - command do i make to remotly connect to the machine, the server ip is 192.168.2.2.

surely this is easy and im a donut?
 
tektonnic said:
Hi All,

I set up an Apache and MySQL on a Windows 2000 server in my house, now i want to use OS X to edit MYSQL through terminal - command do i make to remotly connect to the machine, the server ip is 192.168.2.2.

surely this is easy and im a donut?

You might be better to use something like phpMyAdmin and it's web interface:

http://www.phpmyadmin.net/

This is what I've used for ages... :)
 
i know how to create and edit dbs and tables from command, i just want to connect using terminal - is this impossible?
 
From what I understand, he wants to and knows how to use MySQL from the command line, but wants to do it remotely.

The best way to connect to the other machine is through SSH. I'm not sure how to setup an SSH server on your Windows machine, but this link should help you in getting started.
After you have the SSH server working, presuming your username on the Windows machine is bob, you would use this command in your OS X terminal:

ssh bob@192.168.2.2

You would then be asked for bob's password, and you'll be at Window's command line. I'm sure you know where to go from there.

(If you're using this as an actual server, you might consider not using Windows if possible. I found this great guide for setting up a server under Ubuntu yesterday.)
 
realityisterror said:
From what I understand, he wants to and knows how to use MySQL from the command line, but wants to do it remotely.

I read it that he wants to use the mysql command line client on his OS X machine to connect to his MySQL server instance running on his windows box....How about a clarification, tek...
 
kingjr3 said:
I read it that he wants to use the mysql command line client on his OS X machine to connect to his MySQL server instance running on his windows box....How about a clarification, tek...

In that case, it would be easier to use your solution, methinks.

Just use 192.168.2.2 as the hostname instead of localhost

mysql -h 192.168.2.2 -u bob -p
Prompt for password
USE DATABASE db1;
 
realityisterror said:
In that case, it would be easier to use your solution, methinks.

Just use 192.168.2.2 as the hostname instead of localhost

mysql -h 192.168.2.2 -u bob -p
Prompt for password
USE DATABASE db1;

Thats right, thanks for that guys, the ubuntu idea is interesting because as I've started doing this I've started realising that windows is a pain...oh thats why I switched...!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.