Koozali.org: home of the SME Server

MySQL remote access on SME 7pre3 Question

Offline Mjohnson

  • *
  • 172
  • +0/-0
MySQL remote access on SME 7pre3 Question
« on: March 02, 2006, 12:50:42 AM »
Is this still the correct command for allowing remote access to MySQL db's??

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no


Thanks

MJ
......

Offline Mjohnson

  • *
  • 172
  • +0/-0
MySQL remote access on SME 7pre3 Question
« Reply #1 on: March 02, 2006, 03:53:46 PM »
This did not work:

config setprop mysqld LocalNetworkingOnly no
signal-event post-upgrade
signal-event reboot



Any thoughts??
......

Offline Mjohnson

  • *
  • 172
  • +0/-0
MySQL remote access on SME 7pre3 Question
« Reply #2 on: March 02, 2006, 11:47:35 PM »
This did not work:

config set mysqld service access public status enabled TCPPort 3306
signal-event remoteaccess-update


Still no ideas folks...
......

Offline Mjohnson

  • *
  • 172
  • +0/-0
MySQL remote access on SME 7pre3 Question
« Reply #3 on: March 03, 2006, 12:23:17 AM »
No sir, I was wrong.  The last attempt was the charm.  I added a signal-event reboot to the end and all was better.

So here it is to allow remote access to MySQL under 7pre3:

config set mysqld service access public status enabled TCPPort 3306
signal-event remoteaccess-update
signal-event reboot
......

dswillia

MySQL remote access on SME 7pre3 Question
« Reply #4 on: March 26, 2006, 06:13:15 PM »
Following the above directions, the mysql server is still not listening on 3306.  I am trying to install software that utilizes a mysql backend using a jdbc java connector.  I have enabled it with the above commands, did a reboot via signal-event and still nothing.  I really only need it to listen on 127.0.0.1 or the local ip address 192.168.0.1, I don't really care to open mysql to the outside interface.  

Regards

Offline Mjohnson

  • *
  • 172
  • +0/-0
MySQL remote access on SME 7pre3 Question
« Reply #5 on: March 26, 2006, 07:21:31 PM »
I used the above proceedure to allow access to MySQL from a remote computer.  

It sounds like you are having problems accessing from your local machine.

I am not familar with the application you reference, but can you confirm access to mysql via a command line or perhaps phpmyadmin??

Have you reviewed the log files?  

Port 3306 is a standard MySql port, is that consistent with your application?
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
MySQL remote access on SME 7pre3 Question
« Reply #6 on: March 26, 2006, 07:37:21 PM »
Quote from: "dswillia"
Following the above directions, the mysql server is still not listening on 3306.  


This:

Code: [Select]

config setprop mysqld LocalNetworkingOnly no
signal-event post-upgrade
signal-event reboot


is required to reconfigure mysql to listen to port 3306 - it will only be accessible to clients on the local network. You will also need to set up mysql access lists.

The other instructions (the ones which you have followed) are required to give remote access to mysql. You probably don't want to do that. You should undo those changes by doing:

config setprop mysqld access private

before making the other change.

Offline LeoM

  • *
  • 33
  • +0/-0
    • http://www.musp.nl
How to connect to remote sql?
« Reply #7 on: April 08, 2006, 02:16:23 PM »
Hi all,

Can anyone give me an example how to connect to a remote MySql database.

I need someone to give access to the database of my e-shop from outside my local network.

Also; what is the set-up in MySql, do I need to create a special user for this?

By "Googling around", and reading the above, I did some tests, but with none of them I could reach the database on my remote server (SME 6.01-0.1)

Regards,

Leo.

silasp

MYSQL remote access.
« Reply #8 on: May 17, 2006, 11:37:35 AM »
Yeah, me too.

I've tried the following:

Code: [Select]

config setprop mysqld LocalNetworkingOnly no
signal-event post-upgrade
signal-event reboot
config set mysqld service access public status enabled TCPPort 3306
signal-event remoteaccess-update
signal-event reboot


From the local shell, the following connects
telnet localhost 3306

From a remote shell, the following times out
telnet myhost.com 3306

What else do I have to do to enable remote access to mysql?

Cheers,
Silas

Offline mmccarn

  • *
  • 2,629
  • +10/-0
MySQL remote access on SME 7pre3 Question
« Reply #9 on: May 27, 2006, 03:38:32 AM »
Do you need to create a 'port forwarding' rule to forward TCP traffic on port 3306 to port 3306 on localhost?

(or, you could use the firewall to put your sql server on a different port - to avoid simple port scanning attacks...)

silasp

Yup, that worked
« Reply #10 on: May 29, 2006, 01:54:06 AM »
Thanks mmcarn. Forwarding another port worked a treat.

The only other thing I needed to do to get it to work was to set the server to use old passwords as per this page:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Cheers,
Silas

georgelee

I still cannot make connection to mysql server
« Reply #11 on: January 27, 2007, 01:19:20 PM »
I tried to execute the command below to access to mysql server locally or remotely and all fail.

Execute:
telnet localhost 3306          /             telnet 192.168.1.189 3306
And I got:
telnet: connect to address 127.0.0.1: Connection refused.

Please help!

Offline jameswilson

  • *
  • 759
  • +0/-0
    • Security Warehouse, trade security equipment
MySQL remote access on SME 7pre3 Question
« Reply #12 on: April 05, 2007, 05:26:07 AM »
Hi all
I'm looking at doing the above but I'm a little concerned, just to open mysql to the world.
I run a web shop on my server and need remote mysql access for a lttle vb.net apo I have developed. Obviously this works great on the local network, and if I opened it up then I'd be able to remotly too, but as above I'm sure it was disabled for a very good reason. Can I restrict it to the 2 ip's that nned access, is mysql host security enough, any basic best practices I should be looking into to keep my superb sme as reliable and secure as it has been

Many Thanks Guys
James

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
MySQL remote access on SME 7pre3 Question
« Reply #13 on: April 05, 2007, 05:35:32 AM »
Do you allow any other remote administration to your SMEServer? SSH?
Regards,
William

IF I give advise.. It's only if it was me....

Offline jameswilson

  • *
  • 759
  • +0/-0
    • Security Warehouse, trade security equipment
MySQL remote access on SME 7pre3 Question
« Reply #14 on: April 05, 2007, 08:57:30 PM »
Quote from: "william_syd"
Do you allow any other remote administration to your SMEServer? SSH?


no i prefer to only open them up when needed. I have temp setup a port forward on 3306 as this works but i have only done this for testing and have since removed the forward.

If i open sh i assume i disable root login, and stop it accepting passwords and only use certs?