MySQL remote control

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu

MySQL remote control

Postby jorricks » Mon Feb 28, 2011 9:26 pm

Hello
I got a question..
I'm planning to buy a Synology nas and my question is
Is the MYSQL database accessible from the outside ore the same network
Especially from the same netwerk.. when like i host a website on my computer if i can use the database of the nas then..
Thx for helping :)
Last edited by jorricks on Wed Jul 13, 2011 7:14 pm, edited 1 time in total.
jorricks
Trainee
Trainee
 
Posts: 10
Joined: Mon Feb 28, 2011 8:47 pm

Re: MySQL remote control

Postby HarryPotter » Mon Feb 28, 2011 9:32 pm

Yes of course mysql may be configured to be accessible from anywhere.
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS713+ / DSM 5.0-4458-1 / 2 x HD204UI (RAID0) / LMS 7.7.3-032
DS712+ / DSM 5.0-4458-1 / 2 x HDS721010KLA330 (RAID0)
DS110+ / DSM 5.0-4458-1 / HD154UI
DS408 / DSM 4.0 2228 / 2 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1637 / ST31000340AS + WD5000KS

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 14117
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: MySQL remote control

Postby athonig » Thu Mar 31, 2011 5:34 pm

Hi,
It wasn't my question, but it sure is my problem.
I'm trying to have remote access from another server to my mysql database on my synology.
There's a dsl router in between which I've set to port forwarding of the 3306.
Then I have enabled/allowed mysql access in the synology router's firewall.

On the outside server I have php:
$handle_db = mysql_connect(ipAddresWhereDslRouterIs, $Dbuser, $Dbpass) or die ('Error connecting to mysql');
mysql_select_db($Dbname, $handle_db);

The Dbuser has all the appropriate rights for database
But all I get is: Lost connection to MySQL server at 'reading initial communication packet', system error: 110
Which tells me there is no connection.
I miss something here, that's for sure.

Maybe someone has a clue and is willing to share?
athonig
I'm New!
I'm New!
 
Posts: 4
Joined: Sat May 29, 2010 2:53 pm

Re: MySQL remote control

Postby jorricks » Wed Jul 13, 2011 6:50 pm

Same problem over here!
We really need to fix this problem!
jorricks
Trainee
Trainee
 
Posts: 10
Joined: Mon Feb 28, 2011 8:47 pm

Re: MySQL remote control

Postby sdh13 » Wed Aug 03, 2011 2:50 pm

Hi

I run mySQL on a DS210J and in order to access directly mySQL database from my PC, I had to create another User for the database as the user Root was not allowed outside the NAS.
It works fine - I use mysql workbench to access my database.
On my router , I have directed all calls on port 3306 on the NAS

sdh13 8)
sdh13
I'm New!
I'm New!
 
Posts: 4
Joined: Thu Oct 07, 2010 10:21 am

Re: MySQL remote control

Postby progrupe » Thu Aug 04, 2011 8:27 am

sdh13 wrote:Hi

I run mySQL on a DS210J and in order to access directly mySQL database from my PC, I had to create another User for the database as the user Root was not allowed outside the NAS.
It works fine - I use mysql workbench to access my database.
On my router , I have directed all calls on port 3306 on the NAS

sdh13 8)


Can you use database management functions? Edit server parameters and etc?
progrupe
I'm New!
I'm New!
 
Posts: 6
Joined: Wed Jul 20, 2011 8:36 am

Re: MySQL remote control

Postby sdh13 » Sun Aug 07, 2011 9:49 am

Hi

I can access to administrative functions, but as I can connect only with a user different from "root" , it is quite limited ;
I mainly use it for backup/restore purpose; when I want to change parameters on the server , I use PhpMyAdmin on the DS210j with the user "root".

sdh13 8)
sdh13
I'm New!
I'm New!
 
Posts: 4
Joined: Thu Oct 07, 2010 10:21 am

Re: MySQL remote control

Postby HarryPotter » Sun Aug 07, 2011 12:50 pm

sdh13 wrote:but as I can connect only with a user different from "root" , it is quite limited

This can be changed with phpmyadmin.
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS713+ / DSM 5.0-4458-1 / 2 x HD204UI (RAID0) / LMS 7.7.3-032
DS712+ / DSM 5.0-4458-1 / 2 x HDS721010KLA330 (RAID0)
DS110+ / DSM 5.0-4458-1 / HD154UI
DS408 / DSM 4.0 2228 / 2 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1637 / ST31000340AS + WD5000KS

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 14117
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: MySQL remote control

Postby JudgeMing » Thu Aug 11, 2011 1:58 pm

Same problem here.
I have created the extra user with phpMyAdmin with the appropriate rights but my local PC tool (SQLyog) still comes back with "1045 Access denied for user 'X' @ 'Y' (using password: YES)" where the X and Y are my user name and the name synology feels that my host has. That host name is in the user table.

What is there to check to get this working?

Thanks,
Roland
DS2411+ with 5x WD20EADS and 5x WD20EARS, AVM Fritz!7390, Humax iHDR5200C, Mede8er MED400X2, Lenovo Thinkpad T420s, APC CS350.
User avatar
JudgeMing
Trainee
Trainee
 
Posts: 18
Joined: Mon Oct 26, 2009 8:14 am

Re: MySQL remote control

Postby JudgeMing » Sun Aug 14, 2011 11:31 am

Found it.

Adding a user into the mysql.user table puts the password as plain text whilst sqlyog expects it to be encrypted. PhPMyadmin has a special screen for adding/maintaining users. Modifying my external access account with this page put the pw encrypted and access was obtained.

I guess the 1045 message is a bit to general.

Roland
DS2411+ with 5x WD20EADS and 5x WD20EARS, AVM Fritz!7390, Humax iHDR5200C, Mede8er MED400X2, Lenovo Thinkpad T420s, APC CS350.
User avatar
JudgeMing
Trainee
Trainee
 
Posts: 18
Joined: Mon Oct 26, 2009 8:14 am


Return to Web Server + PHP / MySQL + MariaDB

Who is online

Users browsing this forum: No registered users and 8 guests