Koozali.org: home of the SME Server

access mysql running on sme server(server only mode)

rlee923

access mysql running on sme server(server only mode)
« on: June 07, 2007, 08:05:35 AM »
Hi,

I am kind of stuck at the moment with this problem.

I have sme 7.1 running on server-only mode.

And I was trying to run some php code through this server.

But I cannot actually access mysql server.

So I've searched quite a lot, on this forum, google, manuals.

I did make it so that it's listening to the port 3306. AND

I did make the mysqld service public.

But it still does not accept the access. - even though the port is actually listening. I've checked this with netstat -ant

When I tried to do telent 192.168.0.199 3306

NHost 'blah' is not allowed to connect to this MySQL serverConnection closed by foreign host.

I thought I might be the port forward setting so I went into the setting of the server-manager (web-based configuration panel) and check port forwarding but I cannot change anything on this because the server mode is 'server-only'.

Any help will be much much much appreciated.

Cheers

Offline Confucius

  • ****
  • 235
  • +0/-0
access mysql running on sme server(server only mode)
« Reply #1 on: June 07, 2007, 08:51:55 AM »
Use the GRANT command (see mysql site for usage) or install phpmysqladmin.

The problem is that you try to access mysql from another machine as the server itself. MySql won't allow that. Options above will help you to deal with this.

rlee923

access mysql running on sme server(server only mode)
« Reply #2 on: June 07, 2007, 09:56:46 AM »
Hi, thanx for the reply

I've just tried what you've suggested. I did grant full access to the user 'root'.

But still doesn't work.

Is there any way of configuring port forward with server only mode?

If there is a way I think it could work.

Regards,

Offline warren

  • *
  • 293
  • +0/-0
access mysql running on sme server(server only mode)
« Reply #3 on: June 07, 2007, 10:25:38 AM »
have you allowed access via :

Quote
config setprop mysqld LocalNetworkingOnly no
 expand-template /etc/my.cnf
 /etc/rc.d/init.d/mysqld restart

rlee923

access mysql running on sme server(server only mode)
« Reply #4 on: June 08, 2007, 03:47:18 AM »
Yeah, I've tried this it wouldn't work.

Initally I was struggling to restart mysqld

but I figured out that I have to run like this

 /etc/rc.d/rc7.d/S50mysqld restart

for some reason I read it from here

http://www.jacsoft.co.nz/Tech_Notes/open3306.shtml

but I still cannot access the mysql server

:(

I think I'll try to put another NIC and see if I can change the mode of the server OR,

Get another system box and install FC6 or 7 on it.

Thanks for the reply warren btw.

Cheers

Offline gerd

  • ***
  • 107
  • +0/-0
access mysql running on sme server(server only mode)
« Reply #5 on: June 08, 2007, 08:38:46 AM »
Just two weeks ago I have set-up a new server including MySQL server access (server only mode) - and I did the following:

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

and everything is ok. Pls check also the firewall of your remote station whethet the port 3306 is opened for the TCP protocoll. (this happened to me once).

good luck

gerd

rlee923

access mysql running on sme server(server only mode)
« Reply #6 on: June 12, 2007, 08:38:36 AM »
Thanks for the post gerd I'll try in about 30 mins when everyone is off the server.

Cheers

Offline gerd

  • ***
  • 107
  • +0/-0
access mysql running on sme server(server only mode)
« Reply #7 on: June 12, 2007, 10:44:16 AM »
I would be pleased to get your reply whether it works or not. I have checked first the access to MySQL via MySQL admin. Also I assume that you have created an user account e.g. via phpmyadmin.... :wink:

gerd

Offline raem

  • *
  • 3,972
  • +4/-0
access mysql running on sme server(server only mode)
« Reply #8 on: June 14, 2007, 08:33:27 PM »
rlee923

> I did grant full access to the user 'root'.

That's probably not what is required. You need to grant access to the particular database for the logged in user & IP of the workstation you are trying to access mysql from.
You can/should use the % user instead.

I suggest you read the mysql manual about grant permissions, on the mysql website.

As well of course, you do need to run those other commands mentioned previously, in order for sme to allow remote access to mysql from workstations etc, but you need to grant user & passwords correctly too.

Search these forums on grant & mysql as there have been many examples given previously of how to do this.
...