简体   繁体   English

mysql 表名与 efcore 区分大小写

[英]mysql has table name case sensitive with efcore

Our mysql database was on Tencent Cloud before, Now we have created one in k8s.我们的mysql数据库之前在腾讯云上,现在在k8s中创建了一个。 Then our program reported an error means "Table packagedb_dev.ShopOrder" doesn't exist;然后我们的程序报了一个错误,意思是“Table packagedb_dev.ShopOrder”不存在; Our table name is lowercase.我们的表名是小写的。 When I change the table name to uppercase, the error disappears.当我将表名更改为大写时,错误消失。 I have been using EFcore and mysql for a long time and have never encountered this error.我用EFcore和mysql很久了,从来没有遇到过这个错误。 The orm is EntityframeworkCore,Version: Microsoft.EntityFrameworkCore 3.1.9 orm 是 EntityframeworkCore,版本:Microsoft.EntityFrameworkCore 3.1.9

I have solved the problem.我已经解决了这个问题。 The cause is that the self-built database is case-sensitive and the database in the container can be cumbersome to set this parameter.原因是自建数据库是区分大小写的,容器中的数据库设置这个参数比较麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM