New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: EntityFrameworkCore无法写入数据 #1947
Comments
AgryDB 设置了名称区分大小写吗? |
没有设置大小写 大小写都试过 update也是一样的提示 |
使用MySQL客户端或obclient插入数据也是提示没有权限吗? |
就只有ef core会提示这个 并且使用ado 跑sql语句都正常 |
给个完整的看看?除了密码 生成的SQL语句可以在日志中捞出来看看确认一下。 |
sql语句拿出来在DBeaver可以正常跑 |
[2024-05-06 14:16:06.635641] WDIAG check_single_table_priv (ob_schema_getter_guard.cpp:3340) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=40][errcode=-5171] INSERT command denied to user 'agry'@'%' for table 'tab_zaj_threeperson_zcsb' [2024-05-06 14:16:06.635648] WDIAG [SHARE.SCHEMA] check_priv (ob_schema_getter_guard.cpp:3647) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=6][errcode=-5171] No privilege(tenant_id=1004, user_id=500002, need_priv=128, table=tab_zaj_threeperson_zcsb, db=AgryDB, user_priv=45632, ret=-5171, ret="OB_ERR_NO_TABLE_PRIVILEGE") [2024-05-06 14:16:06.635657] WDIAG [SQL.SESSION] check_privilege (ob_privilege_check.cpp:2525) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] No privilege(session_priv={tenant_id:1004, effective_tenant_id:18446744073709551615, user_id:500002, user_name:"agry", host_name:"%", db:"agrydb", user_priv_set:45632, db_priv_set:5008}, disable check=0, ret=-5171) [2024-05-06 14:16:06.635665] WDIAG [SQL] pc_get_plan (ob_sql.cpp:3927) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] No privilege(ret=-5171, stmt_need_priv={need_privs:[cnt:1, {db:"AgryDB", table:"tab_zaj_threeperson_zcsb", priv_set:128, priv_level:3, is_sys_table:false, is_for_update:false, priv_check_type:0}]}) [2024-05-06 14:16:06.635675] WDIAG [SQL] stmt_query (ob_sql.cpp:227) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] fail to handle text query(stmt=INSERT INTO |
使用 Pomelo.EntityFrameworkCore.MySql 采用mysql模式写入数据提示没有权限
授权模式采用数据库权限授权 写入数据时 报错表没有insert权限
授予全局权限后正常
库链接字符串 server=;port=62883;database=;Uid=;Pwd=;SslMode=none
包版本信息
MySqlConnector 2.1.2
Pomelo.EntityFrameworkCore.MySql 6.0.2
部分日志
[2024-05-06 14:16:06.635598] WDIAG [SHARE.SCHEMA] check_single_table_priv (ob_schema_getter_guard.cpp:3321) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] No privilege, cannot find table priv info(tenant_id=1004, user_id=500002, table_need_priv={db:"AgryDB", table:"tab_zaj_threeperson_zcsb", priv_set:128, priv_level:3, is_sys_table:false, is_for_update:false, priv_check_type:0})
[2024-05-06 14:16:06.635641] WDIAG check_single_table_priv (ob_schema_getter_guard.cpp:3340) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=40][errcode=-5171] INSERT command denied to user 'agry'@'%' for table 'tab_zaj_threeperson_zcsb'
[2024-05-06 14:16:06.635648] WDIAG [SHARE.SCHEMA] check_priv (ob_schema_getter_guard.cpp:3647) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=6][errcode=-5171] No privilege(tenant_id=1004, user_id=500002, need_priv=128, table=tab_zaj_threeperson_zcsb, db=AgryDB, user_priv=45632, ret=-5171, ret="OB_ERR_NO_TABLE_PRIVILEGE")
[2024-05-06 14:16:06.635657] WDIAG [SQL.SESSION] check_privilege (ob_privilege_check.cpp:2525) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] No privilege(session_priv={tenant_id:1004, effective_tenant_id:18446744073709551615, user_id:500002, user_name:"agry", host_name:"%", db:"agrydb", user_priv_set:45632, db_priv_set:5008}, disable check=0, ret=-5171)
[2024-05-06 14:16:06.635665] WDIAG [SQL] pc_get_plan (ob_sql.cpp:3927) [5337][T1004_L0_G0][T1004][YB420A0A3C0E-000617AF272DE687-0-0] [lt=8][errcode=-5171] No privilege(ret=-5171, stmt_need_priv={need_privs:[cnt:1, {db:"AgryDB", table:"tab_zaj_threeperson_zcsb", priv_set:128, priv_level:3, is_sys_table:false, is_for_update:false, priv_check_type:0}]})
The text was updated successfully, but these errors were encountered: