[kwlug-disc] Ubuntu 11.04 and LAMP :: Problems w/ MySQL access over 'net

John Johnson jvj at golden.net
Fri May 13 23:10:53 EDT 2011


On 2011-05-13 21:46, unsolicited wrote:
> John Johnson wrote, On 05/13/2011 8:14 PM:

< ... snip ...>

>> Though LAMP I have MySQL installed.
>> MySQL works locally.
>> MySQL works through http://localhost/ see below.
>> *MySQL does not work through the tubes*.

< ... snip ...>

> I don't have the answer, but some thoughts and suggestions:
> - IIRC, Apache works on names, not numbers. I expect localhost is an 
> exception, or the browser auto-translates it to 127.0.0.1. So:
> - if http://localhost/etc works, does http://<real ip address>/etc work?

http://<real ip address>/etc does indeed work w/caveats
a) on the Linux box: the ip address is that of my subnet behind the 
router, i.e. 192.168.0.102
b) on the Win box: (w/HTTP 500 error): the ip adrress is the 'real 
world' ip address

> - does http://<mymachinename>/etc work.

Again http://<mymachinename>/etc does work - on the Linux box.
http://<mymachinename> is not mapped* such that it can be found from the 
Win box.
* I see your suggestions below re hosts.

> - From windows, if you do telnet 80 <ipaddress>, does anything good 
> happen, like, text of any sort? If you type in 'get stuff' do you get 
> file not found sort of thing?

telnet -l username 192:168.0.102 80 did bring up something - the text of 
the index.html file on the Linux box

I did not mention above that the etc part of the http://<real ip 
address>/etc is a path name to my test file.
And that if the etc is left out as in http://<real ip address>/ the 
browser brings up index.html

Anyway: telnet from windows works - but does not help.

> - it should be the apache process calling mysql, ...

Nadda. See above.

> so if it works on locahost, I suspect it should work everywhere. i.e. 
> not a caller permissions, or access, error. 

index.html executes locally (in the Linux box) and remotely from the 
WinXP box
other files, with php extensions & php code, also execute locally (in 
the Linux box) and remotely from the WinXP box
the problem is when MySQL code is buried in the php files, these files 
execute locally through localhost and through 192.168.0.102
but not remotely from the WinXP box
it could be a caller permissions or access error - hence my attempt to 
use chmod
btw: php code w/o the MySQL code is in the same directory as php code 
with the MySQL code (so not a perms error on the dir)

> It might not hurt to update %windir%\system32\drivers\etc\hosts with 
> appropriate names, so you can browse by name, not just ip. You might 
> update lmhosts while you're there - perhaps facilitating samba in your 
> future.

Tx: For this info.

JohnJ


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20110513/a122fc89/attachment.htm>


More information about the kwlug-disc mailing list