当前位置:   article > 正文

ERROR 1142 (42000): INSERT command denied to user 'radius'@'localhost' for table 'radcheck'

error 1142 (42000): insert command denied to user

/etc/freeradius# mysql -uradius -p

passwd:


mysql> use radius;

mysql> show tables;
+------------------+
| Tables_in_radius |
+------------------+
| radacct                |
| radcheck             |
| radgroupcheck    |
| radgroupreply      |
| radpostauth         |
| radreply               |
| radusergroup       |
+------------------+

7 rows in set (0.00 sec)


mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Auth-Type',':=','Local');
ERROR 1142 (42000): INSERT command denied to user 'radius'@'localhost' for table 'radgroupreply'


原因:权限不够,登录数据库的方式不对。用mysql -uradius -p 方式登录进去后无法进行插入操作,需要用root用户登录。

解决:/etc/freeradius# mysql -uroot -p

passwd:

mysql> use radius;

mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Auth-Type',':=','Local');

Query OK, 1 row affected (0.00 sec)

成功!


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/625068
推荐阅读
相关标签
  

闽ICP备14008679号