Koozali.org: home of the SME Server

SOLVED Remote access MySQL from Windows command line on a LAN; 8.0beta4

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Apparently I need some clues as to how to go about remote access to my LAN's SME 8.0beta4 MySQL server.  I tried the instructions provided here, I assume they work for this Beta version:

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Access_MySQL_from_the_local_network

But, I am still not getting in using the basic command line from my XP machine:

'mysql -h <My host number> -u <root> -p'

Should I be specifying a socket?  The instructions mention something about a socket.  Are there some other issues about this being a Beta version?

Any and all tips or clues would be appreciated.
« Last Edit: February 10, 2010, 11:37:26 PM by LANMonkey »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #1 on: February 10, 2010, 09:26:58 PM »
please, report any bug in bugzilla, thank you

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #2 on: February 10, 2010, 11:03:08 PM »
please, report any bug in bugzilla, thank you

No, bugzilla doesn't deal with instructing users how to use commandline mysql on Windows XP.

LANMonkey, 'root' user should only be used to create new mysql users and databases, and should have no access from the network. Create a new mysql user, and new mysql database, and create appropropriate access permissions to allow that user to access that db from the LAN. All that is detailed in the wiki.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #3 on: February 10, 2010, 11:04:59 PM »
sorry Charlie, you are right.. but I was thinking about something wrong on the SME side :-)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #4 on: February 10, 2010, 11:37:02 PM »
Thanks all for replying.

Do I understand correctly that 'root' is never allowed access to MySQL from outside localhost?  I happened to create a user with complete GRANT privileges that is now able to access MySQL from the LAN.

This is not made at all clear anywhere at the Wiki link I posted.  If Bugzilla addresses omissions in documentation, I would be happy to file something, unless somebody can quote a reference and link.

Otherwise, I consider the problem to be SOLVED.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #5 on: February 11, 2010, 12:11:29 AM »
Do I understand correctly that 'root' is never allowed access to MySQL from outside localhost?
...
This is not made at all clear anywhere at the Wiki link I posted.

The wiki says:

Quote
SME Server's default mysql database users, and most of the database examples in the wiki, allow login only from localhost.

If you want to access a mysql database on your SME server from other computers, you must not only make the configuration changes described above, you must also create a user who is allowed to login from those systems (see 5.5.4. Access Control, Stage 1: Connection Verification for more detail).

Quote
If Bugzilla addresses omissions in documentation, I would be happy to file something,

You can ask for any missing Documentation to be added, via the Doc section of Bugzilla. But I don't see that anything is missing here.

Quote
Otherwise, I consider the problem to be SOLVED.

Please add SOLVED to Topic Summary of thread.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #6 on: February 11, 2010, 11:16:42 PM »

You can ask for any missing Documentation to be added, via the Doc section of Bugzilla. But I don't see that anything is missing here.


"SME Server's default mysql database users, and most of the database examples in the wiki, allow login only from localhost.

If you want to access a mysql database on your SME server from other computers, you must not only make the configuration changes described above, you must also create a user who is allowed to login from those systems (see 5.5.4. Access Control, Stage 1: Connection Verification for more detail). "

You must create a user who is allowed to login from those systems.  Yes, but this is an elementary task in MySQL that has nothing to do with SME.  So, if I see that the GRANTS to root do not include access from outside of local host, I must either change that root so that it becomes a user with remote privileges or add another user named 'root'@'<remote address or `%` for any address>' which is what I did.  But this made no difference.  I still could not access SME's MySQL from outside of locahost.  SME makes it impossible for any user named root to access MySQL remotely.  This is entirely different and deserves a more explicit explanation in the documentation.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #7 on: February 12, 2010, 04:15:00 PM »
I must either change that root so that it becomes a user with remote privileges or add another user named 'root'@'<remote address or `%` for any address>' which is what I did. 
Where is your second option implied by using either? You should never do the above. You should create a seperate user, with minimum required privileges. You should never mess with the root account for MySQL.

The FAQ states this for a purpose:
"you must also create a user who is allowed to login from those systems"

It never stated that you should have modified your root user. It explicitly told you to create a user. I seriously suggest you revert your changes as your current configuration is a high security risk.

Please follow these instructions to create users:
http://wiki.contribs.org/MySQL#Creating_MySQL_user.28s.29
and fore more details look through the MySQL manual.

SME makes it impossible for any user named root to access MySQL remotely.  This is entirely different and deserves a more explicit explanation in the documentation.
That is not true and you show no proof for such a bold statement. You most likely have done something wrong or forgotten something as this does work. Perhaps you forgot to update the privileges or use the proper password?
« Last Edit: February 12, 2010, 04:21:21 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: SOLVED Remote access MySQL from Windows command line on a LAN; 8.0beta4
« Reply #8 on: February 12, 2010, 05:30:59 PM »
Well, my problem is solved and if anyone else has the same problem, I only hope they find this thread and find the relief and insight that I was looking for.

I have nothing more to say on the subject.

Thanks again to all who posted.