我安装了 FreeRadius 和 Web 界面 Daloradius。 很遗憾,我无法登录 http://radiusip/daloradius .
我总是收到错误信息:
数据库连接错误 错误消息:数据库错误:找不到扩展
当我退出调试 (FreeRadius -X) 时,日志总是这样写:
tail -f /var/log/mysql/error.log:
2016-08-26T10:33:54.070388Z 444 [Note] Aborted connection 444 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.070498Z 443 [Note] Aborted connection 443 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.070613Z 442 [Note] Aborted connection 442 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.070677Z 441 [Note] Aborted connection 441 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.070788Z 440 [Note] Aborted connection 440 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.070979Z 439 [Note] Aborted connection 439 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.071049Z 438 [Note] Aborted connection 438 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.071159Z 437 [Note] Aborted connection 437 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.071274Z 436 [Note] Aborted connection 436 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
2016-08-26T10:33:54.071306Z 455 [Note] Aborted connection 455 to db: 'radius' user: 'freeradius' host: 'localhost' (Got an error reading communication packets)
密码在所有必要的配置文件中都是 100% 正确的,我停用了防火墙。我认为这与未正确关闭连接和/或错误的权限有关。
MySql 用户的权限是:
mysql> show grants;
+----------------------------------------------------------------+
| Grants for freeradius@localhost |
+----------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'freeradius'@'localhost' |
| GRANT ALL PRIVILEGES ON `radius`.* TO 'freeradius'@'localhost' |
+----------------------------------------------------------------+
2 rows in set (0.00 sec)
有什么想法吗?
它是 Ubuntu 16.04、Daloradius 0909 和 FreeRadius V3
最佳答案
我设法让它工作了。 如果您遇到同样的问题,这对我有帮助:
问题是,我安装了 PHP7.0,但 daloradius 只支持 5.0 所以我们必须改变语法阅读的规则。使用以下命令:
确保你有所有必要的包
sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-dbnter code here sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db pear install DB cd /var/www/html/daloradius/library/ vim daloradius.conf.php -> CONFIG_DB_ENGINE auf "mysqli" # from mysql to mysqli vim opendb.php -> $dbSocket->query("SET GLOBAL sql_mode = '';"); #append this line at the end of the file
现在我们必须授予 db-user freeradius super 权限:
mysql -u root -p
mysql> GRANT SUPER ON *.* TO 'freeradius'@'localhost' IDENTIFIED BY 'password';
mysql> flush privileges;
- 我必须导入一个 mysql 模式:
cd /var/www/html/daloradius/contrib/db/
mysql -u root -p radius <mysql-daloradius.sql
关于mysql - 自由半径/Daloradius : Database connection error & extension not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39166006/