Connecting to mysql from within a LAN

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Connecting to mysql from within a LAN

Postby kenoli » 03. July 2012 15:51

I am using Navicat to manage my databases. I can access remote mysql servers easily but have not been able to figure out how to access mysql via an XAMPP server on another computer on my local network.

The settings I am using for my connection are:

[local ip address of the computer I want to connect with, e.g. 10.0.1.7]
port: 3306 (Is this correct for XAMPP
UserNmae: as appropriate
Password: as appropriate

Connection fails.

I am confused by the mysql documentation. It says:

"The server accepts the connection only if the Host and User columns in some user table row match the client host name and user name and the client supplies the password specified in that row."

Does this mean that on the machine I am logging onto, the user table on that machine needs to have the IP address of the machine I am logging on from, and a User and Password that match those give by the computer attempting to log on?

I have tried this and it doesn't work. I also tried other combinations of IP addresses, e.g. reversing the client & server addresses.

I also read on the Apache Friends web site that:

"Please note! Two servers cannot be started on one same port!"

What does this mean. If the computer I am logging onto has its server up and running, do I need to use a different port to log onto it? Which port?

Sorry if my questions reveal my ignorance of the issues. I have tried to educate myself on XAMPP, Navicat and MYSQL and still only have a vague grasp of the issues.

Can anyone help me?

Thanks,

--Kenoli
kenoli
 
Posts: 25
Joined: 11. May 2009 19:06

Re: Connecting to mysql from within a LAN

Postby JonB » 05. July 2012 15:03

ON your first question -

I am using Navicat to manage my databases. I can access remote mysql servers easily but have not been able to figure out how to access mysql via an XAMPP server on another computer on my local network.

The settings I am using for my connection are:

[local ip address of the computer I want to connect with, e.g. 10.0.1.7]
port: 3306 (Is this correct for XAMPP
UserNmae: as appropriate
Password: as appropriate

Connection fails.


The problem is likely the host scope of the user you are trying to connect as.

Check in the source computer's MySQL database/tables - mysql/user and see what privileges were extended to that user in the host specification

i.e. is it " 'bob'@'localhost' : or is it " 'bob'@'%' ".

Database mysql Table user Columns 'host' & 'user'

If the User only has an entry for 'localhost', then that user cannot be authenticated except via the server on a local socket. That would mean the 'client' is the localserver. Navicat is a remote client normally, so the machine it is on would have to have a valid hostname, or be in the scope of a host definition.

https://dev.mysql.com/doc/refman/5.5/en ... users.html

Of course, I'm NOT 100% sure this is your issue, but its a likely candidate.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 11 guests