NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Gearsy
May 02, 2015Tutor
How to enable remote access?
Hi all,
I've read a million different threads explaining how to do this and they all seem to be very similar and have one thing in common - step one is over my head!
I am trying to set up a MYSql db to allow my osmc/kodi media player to store the library on the NAS
I have the following set up:
RN104 (IP is 192.168.1.8)
Firmware 6.2.4 (updated)
MySQL addon
PHPMyAdmin addon
separate laptop with MYSQL workbench and putty.exe
I have accessed MySQL via PHPMyadmin and can create a db etc and I believe the step that I need to complete is to add the following to the my.cnf file:
bind-address = 0.0.0.0
# skip-networking
but I have not been able to do this. I have tried to access via putty but I get a "Network error: connection refused" message.
My settings in putty
IP 192.168.1.8
Port 3306
Rlogin root
I can get to a login prompt if I leave the port as 22 but then I am not sure which credentials it is after. I have tried UN: root PW: root, I have tried my NAS' UN&PW and I have tried UN:root PW: (leave blank)
Any help would be very much appreciated and please consider my lack of experience when considering how to provide instructions as I am well out of my depth.
Thanks.
I've read a million different threads explaining how to do this and they all seem to be very similar and have one thing in common - step one is over my head!
I am trying to set up a MYSql db to allow my osmc/kodi media player to store the library on the NAS
I have the following set up:
RN104 (IP is 192.168.1.8)
Firmware 6.2.4 (updated)
MySQL addon
PHPMyAdmin addon
separate laptop with MYSQL workbench and putty.exe
I have accessed MySQL via PHPMyadmin and can create a db etc and I believe the step that I need to complete is to add the following to the my.cnf file:
bind-address = 0.0.0.0
# skip-networking
but I have not been able to do this. I have tried to access via putty but I get a "Network error: connection refused" message.
My settings in putty
IP 192.168.1.8
Port 3306
Rlogin root
I can get to a login prompt if I leave the port as 22 but then I am not sure which credentials it is after. I have tried UN: root PW: root, I have tried my NAS' UN&PW and I have tried UN:root PW: (leave blank)
Any help would be very much appreciated and please consider my lack of experience when considering how to provide instructions as I am well out of my depth.
Thanks.
8 Replies
Replies have been turned off for this discussion
- GearsyTutorOk I have managed to log in via ssh using UN: root and password as per GUI
Now I need to access the my.cnf file. I tried typing in /etc/mysql/my.cnf and it gave me this:
root@GearsideNAS:~# /etc/mysql/my.cnf
-bash: /etc/mysql/my.cnf: Permission denied
root@GearsideNAS:~#
Any guidance on my error? - mdgm-ntgrNETGEAR Employee RetiredYou told the NAS to execute that file like one would execute a script or binary.
What you want is to read the file's contents and to edit it. There are commands such as cat, vi etc. that you should look into. - GearsyTutorI don't suppose you have a link that will help me? Ive googled it and ran the command vi etc/my.cnf and it spat this:
~
~
~
~
"/etc/my.cnf" [New File] - mdgm-ntgrNETGEAR Employee RetiredYou said before that the file was /etc/mysql/my.cnf not /etc/my.cnf
As /etc/my.cnf does not exist when you did
# vi /etc/my.cnf
It realised it needed to create a new file.
Note there is a vi cheat sheet on the web. - GearsyTutorSorted it out finally. I have to say that was one of the most convoluted problems I've encountered on the PC. When I executed # vi etc/mysql/my.cnf It came up with a message then hit enter to continue and I thought it had failed as I scrolled to the bottom of the scroll bar and didn't see the information I needed but then I found that I could continue to scroll down further. Skip Networking is also no longer in the original config file so all that was required was to change the bind address.
This was all just to enable my raspberry pi to generate a database to allow sync across other units but I felt like Alice going in rabbit hole after rabbit hole getting deeper and deeper to solve what seemed to be a simple requirement.
Sorry for the whinge and thanks for the little bit of guidance. - GearsyTutorHi all,
I typed up what I believe to be a step by step for this process for dummies like me. Before I send these to the Kodi wiki admin I'd appreciate if someone smarter could vet it as correct.
How to enable netgear readynas to allow access by external equipment.
(Note: this works for firmware 6.2.4 please confirm for prior rel.)
Open the NAS admin page then select the 'Apps' tab.
MySQL should already be installed by default otherwise you'll need to install that first.
Otherwise, select 'Available Apps' then scroll to PHPMyAdmin and select 'install'
Once that has installed you will need to launch the app then log in with UN 'root' and PW *leave blank*
open the 'Users' tab and select 'Add user'
Enter user name as 'kodi' (to match your UN from advancedsettings.xml)
Leave 'host' as any host and leave the box blank
Type PW as 'kodi' (to match your PW from advancedsettings.xml)
Select check box 'Grant all privileges on wildcard name (username\_%)'
Select 'check all for 'Global privileges (Check All '
This creates the user profile that the kodi unit will use to create its own database. Next we need to tell the NAS/SQL to allow external equipment (your Kodi unit) by binding the address to 0.0.0.0 in the MySQL config file.
Doing this involves SSH which I find to be a bit of tricky black magic and Netgear warn that they may deny support if you activate it. If you follow the instructions you should be fine.
Firstly, back at the NAS' admin page select the 'system' tab and then 'settings' and then under services you will see 'SSH' check that to activate it.
Now download putty.exe (available here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
Open putty.exe select run and then click on the host box. Fill in your NAS ip (192.168.1.*???)
Leave the port set as 22 (this is the SSH port).
You will then see a black screen with 'login as:' prompt. type 'root' hit enter.
The PW is the password for your NAS admin account. As you type the PW the cursor will not move or even blink so you may wonder if it is working. It is.
You will then receive the following prompt: 'root@*YourNASnamehere*:~#'
Type the following after the #: vi /etc/mysql/my.cnf
You are them presented with some text and the following prompt:
'Press ENTER or type command to continue' Hit enter
You are now presented with the config file (my.cnf) though this may not be obvious because you have to use the scroll arrows tow scroll down even though the scroll marker is at the bottom.
You are looking for [mysqld]
In the text below that you will see bind address = 127.0.0.1
Don't touch anything yet.
You best read this cheat sheet which explains how to edit the file (http://www.lagmonster.org/docs/vi.html)
What it tells you is to enter 'R' then type 0.0.0.0 over the '127.0.0.1' and then hit 'X' to delete any digits remaining.
It used to be that skip networking needed to be deleted but that is no longer required as it has been left out of the MySQL config file now.
Once that is done type ZZ to Exit and save changes if any have been made
Now close putty and breathe a sigh of relief that you didn't shut down the internet worldwide.
Reboot your NAS
Move on to configure your kodi unit so that it will create the database on your NAS. - GearsyTutorI'll have to take silence as acceptance I guess.
- MrToadyAspirantThis looks exactly what I was thinking about trying with a Raspberry Pi 2. Looking forward to trying out your guide.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!