
我買了一個合勤網路儲存 326現在我在從非本地主機的電腦存取 MySQL 時遇到問題。
MySQL是透過php-mysql-phpmyadmin APP(唯一一個有MySQL的)安裝的,我不知道如何更改MySQL配置來綁定存取。
從 SSH 我找不到 my.cnf 檔案。
如何修改MySQL的設定?
答案1
您需要將以下4個檔案從“127.0.0.1”變更為“0.0.0.0”
/usr/local/mysql/bin/reset_zyadmin - 行:25:./bin/mysqld_safe --skip-grant-table --bind-address=127.0.0.1 &
/usr/local/mysql/bin/reset_zyadmin - 行:65:./bin/mysqld_safe --user=mysql --bind-address=127.0.0.1 &
/usr/local/mysql/bin/reset - 行:38:./bin/mysqld_safe --user=mysql --bind-address=127.0.0.1 &
/usr/local/mysql/bin/init - 行:13:./bin/mysqld_safe --skip-grant-table --bind-address=127.0.0.1 &
然後登入zyxel 管理頁面,選擇應用程式PHP-MySQL-phpMyAdmin 並按“重設MySQL 資料庫密碼” 備註:將密碼重設為預設值後,它將建立綁定位址值為“0.0.0.0”,現在您可以登入遠端MySQL(注意:MySQL使用者也必須設定為任何主機)享受:)
答案2
另外在 Ek 的解決方案中,我找到了一個 mod,可以讓 Zyxel 啟動時永久使用 mysql 遠端存取。 https://homeforum.zyxel.com/discussion/1926/the-mysql-server-of-the-nas326-app-runs-only-on-localhost-how-do-i-make-it-lan-reachable 「nintendoeats」發現:「透過 SSH 連接到您的 NAS,然後使用 vi 編輯以下檔案:/i-data/longAlphanumeric/.PKG/PHP-MySQL-phpMyAdmin/etc/init.d/PHP-MySQL-phpMyAdmin
您需要進行 2 處更改:
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.
儲存,重新啟動 NAS,開個派對。