tags:

views:

37

answers:

1

Hi All,

I am working on a web app that is hosted on a web server in a demilitarized zone (DMZ). I need to run MySQL queries on the database that is on its own server which is on the same local network as the web server, but not accessible via the internet.

I can access the Web Server using putty, and the web server has MySQL installed. I can also SFTP sql files to the webserver.

I feel like I have all the Tools I'm just mising some knowhow! Any help on how I can execute these sql files would be greatly appreciated.

Thanks in advance,

Chris

A: 

You need to bind MySQL to the IP of the Server it is running on. Change the config (my.cnf) where it says:

bind = 127.0.0.1

to the correct IP. Don't forget to restart the MySQL daemon after that.

Edit: Maybe I've got you wrong. So second try:

If you just want to execute SQL-Files on a Server you've got SSH access to you can run them by executing:

ssh user@server 'cat yourfile.sql|mysql -u user -pPassword --database=dbname'

Hope that helps.

Best wishes,
Fabian

halfdan
Hi Fabian,I added this line under [mysqld] but mydql would not restart.Chris
Chris Rowe