The MySQL server of the NAS326 app runs only on localhost, how do I make it LAN reachable?
Sivaka
Posts: 2 Freshman Member
Hello, everyone!
I've been trying to configure the MySQL app for my NAS326 for a solid day now and it's getting a little frustrating, so here I am! I need to configure the server so that it accepts requests from the whole local network as opposed to the default localhost option (since the local host is the NAS itself as far as the MySQL server is concerned). Don't see this configuration anywhere in the default settings, so I'm trying to use a phpMyAdmin generated setup script, which fails to import with the descriptive message "Could not import configuration". At this point I'm desperate enough to look for ways to hack into the /i-data/146e8075/.PKG/PHP-MySQL-phpMyAdmin/ folder and configure the config.inc.php script myself.
Thanks in advance, any help or suggestion will be greatly appreciated!
P.S. The MySQL server app was pretty much what leaned me towards the Zyxel NAS in the first place, so I really hope we can get this thing working!
#NAS_Dec_2018
I've been trying to configure the MySQL app for my NAS326 for a solid day now and it's getting a little frustrating, so here I am! I need to configure the server so that it accepts requests from the whole local network as opposed to the default localhost option (since the local host is the NAS itself as far as the MySQL server is concerned). Don't see this configuration anywhere in the default settings, so I'm trying to use a phpMyAdmin generated setup script, which fails to import with the descriptive message "Could not import configuration". At this point I'm desperate enough to look for ways to hack into the /i-data/146e8075/.PKG/PHP-MySQL-phpMyAdmin/ folder and configure the config.inc.php script myself.
Thanks in advance, any help or suggestion will be greatly appreciated!
P.S. The MySQL server app was pretty much what leaned me towards the Zyxel NAS in the first place, so I really hope we can get this thing working!
#NAS_Dec_2018
0
Accepted Solution
-
It is sad as NAS was able to access Mysql via LAN, but for some reason that Zyxel block LAN acces and only can through NAS itself.
Moreover, the mysql command was not included in Zyxel NAS, that no possible to use command "update mysql.user set host='0.0.0.' where user=''" and also could not find the config file for my.conf.
Therefore, currently I think there is not the way to make it working.0
All Replies
-
It is sad as NAS was able to access Mysql via LAN, but for some reason that Zyxel block LAN acces and only can through NAS itself.
Moreover, the mysql command was not included in Zyxel NAS, that no possible to use command "update mysql.user set host='0.0.0.' where user=''" and also could not find the config file for my.conf.
Therefore, currently I think there is not the way to make it working.0 -
Might be similar to this:
On 540/542 the 'bind-address is always restored to defaults (127.0.0.1) when updating/re-installing FW.
Could be worth a try to check and try with "bind-address=0.0.0.0"
(Location: /i-data/ede84c02/.PKG/PHP-MySQL-phpMyAdmin/etc/init.d)
For some weird reason seems Zyxel people think that the MySQL is for local/internal use only...0 -
Thank you for the answers, guys, it's really a shame that's the current state of things!0
-
For anybody who has this problem, I can haz solution (requires you to set up a static IP).Install and enable phpmyadmin. Ensure that the client is closed.ssh in to the NAS as root (yes, you must be root)ps | grep mysql note the ID of the mysql processkill mysqlProcessID
cd /i-data/LongAlphanumericThatIThinkIsUnique/.PKG/PHP-MySQL-phpMyAdmin/mysql
./bin/mysqld_safe --user=mysql --bind-address=Static.IP.address.oftheNASThat's it! I wanted to use the SQL server to centralize my Kodi database, and it does that. Performance is obviously limited on such a low-powered box, but hey it was cheap!
0 -
For anybody who is still having this problem, I have a solution (requires that your NAS have a static IP address)
- Install phpmyadmin and enable it (don't open it yet)
- ssh into your NAS as root (yes, you must be root)
- ps | grep mysql note the ID of the mysql process
- kill mysqlProcessID
- cd /i-data/LongAlphanumericThatIThinkIsUnique/.PKG/PHP-MySQL-phpMyAdmin/mysql
- ./bin/mysqld_safe --user=mysql --bind-address=Static.IP.address.oftheNAS
And there you go! I haven't set this up to happen automatically, but it works fine like this! I'm using it to centralize my kodi database.0 -
TY @nintendoeats
Too bad that it runs an ancient MySQL version...
An update to more recent version would be magic, ATM I moved out my DB's to RPi instead.0 -
How can I put this...the MySQL server you have with you is the better than the MySQL server on an RPi that's still in the box in China
0 -
Well, MariaDB (10.3) on 2GB RPi 4 together with Pi-hole does the job and updates as required!0
-
UPDATE: I figured out a better way, that works automatically on startup. the previous method required executing those commands every time you rebooted the NAS. Yes, you could run a script from the file I'm going to show you but...I like this better (it's cleaner, and yet slightly naughty).SSH into your NAS, and use vi to edit the following file:/i-data/longAlphanumeric/.PKG/PHP-MySQL-phpMyAdmin/etc/init.d/PHP-MySQL-phpMyAdminYou need to make 2 changes:
- ln the chckmd5sum() function, change return 2 to continue (this bypasses the md5 check). This is at line 31.
- In the enable() function, find the line with --bind-address=127.0.0.1 and change it to the NAS'es static IP. This is at line 61.
Save, restart your NAS, have a party.
2 - ln the chckmd5sum() function, change return 2 to continue (this bypasses the md5 check). This is at line 31.
-
Nintendoeats' solution is truly the best! After changed the scripts based on Ek's (https://superuser.com/questions/1127208/remote-access-to-a-mysql-on-zyxel-nas) and other's description it was still needed to do a RESET Password in PHPMySql after every restart.With overriding the chkmd5sum check, the Zyxel script starts with the modified parameter set on every restart. Of course, --bind-address=0.0.0.0 is better than a static IP in case of an IP address change.
0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 148 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 262 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight