LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-24-2003, 01:10 PM   #1
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Rep: Reputation: 15
conecting to MySQL remotely


I have a RH Server running MySQL

I have my windows PC (I know, I know) at home where I write php scripts. I want to be able to test out the php scripts which access the mysql database on the server at work.

Lets say I know the IP address of the server is

68.98.216.100 (Running Mysql)

my home pc connects to the internet via cable modem

I can currently type http://localhost at home and view all phpscripts however when I use the scripts to log into the database they do not connect to mysql server at work.

someone told me to try adding
-A RH-Lokit-0-50-INPUT -p tcp -m tcp --dport 3306 --syn -j ACCEPT

I tried this and I still cant' connect to MySQL

Here is a partial of the PHP script that connects to the database.
$result = @mysql_pconnect("68.107.216.103", "book_bc", "admin");

Can anyone help me?

THanks
 
Old 02-24-2003, 04:31 PM   #2
Miky
Member
 
Registered: Dec 2002
Location: London / Paris
Distribution: Debian / OpenBsd
Posts: 74

Rep: Reputation: 15
It seems you use ipchains (?)

In both ipchains and iptables you have to think about that

1st step

client sent packet with syn flag to ------------>server



2nd
server answer with syn/ack -----------> client


3rd
client replies ack ----------------->server


You didn't precise on which computer you want to add the rule so i can't answer you question.

first try to connect the mysql server with a basic command such as telnet :

telnet server 3306

and see if it work

Ciao
 
Old 02-24-2003, 07:59 PM   #3
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Is there a firewall that wraps your work network which blocks external access to the server that you're trying to connect to? I mean, even if you open up the local firewall on the box to accept 3306 TCP, your company/firewall packet filter might just be 'swallowing' those packets before they get to the local box.

I would telnet to the box to see if the basic IP routing works. Then try the mysql client at home to query the work box . And then try calling it from PHP. In that order.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remotely connecting to MySQL using SSH Teleute Linux - Security 19 03-25-2005 10:51 PM
Log in to mysql remotely chamalsl Linux - Security 6 03-23-2005 01:40 PM
RH: Trying to make script to remotely modifie mysql db. paulvl Linux - General 1 12-05-2003 10:08 AM
Accessing MySQL remotely: good programs? seppuku Red Hat 1 11-11-2003 08:34 AM
Can't connect to MySQL server remotely on RedHat 9 bper Red Hat 4 10-02-2003 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration