MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'shop.aclRecord' doesn't exist + workaround

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anos atrás
Linux Ubuntu 20.04 + MySQL
MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'shop.aclRecord' doesn't exist

In Ubuntu table names are case sensitive by default and cannot be changed after the tables are created (default: lower_case_table_names = 0)

The table created during the installation is a uppercase A like "AclRecord". Howevery, one part of the source code is looking for a table 'aclRecord'.
I was able to mitigate this by creating a view 'aclRecord' but you might change this in further releases.

The log entry:
MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'shop.aclRecord' doesn't exist
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior)
   at LinqToDB.Data.CommandInfo.Query[T]()
   at LinqToDB.Data.CommandInfo.QueryProc[T]()
   at Nop.Data.BaseDataProvider.QueryProc[T](String procedureName, DataParameter[] parameters) in C:\andrei\nop_sources\src\Libraries\Nop.Data\BaseDataProvider.cs:line 273
   at Nop.Data.EntityRepository`1.EntityFromSql(String storeProcedureName, DataParameter[] dataParameters) in C:\andrei\nop_sources\src\Libraries\Nop.Data\EntityRepository.cs:line 159
   at Nop.Services.Catalog.ProductService.SearchProducts(IList`1& filterableSpecificationAttributeOptionIds, Boolean loadFilterableSpecificationAttributeOptionIds, Int32 pageIndex, Int32 pageSize, IList`1 categoryIds, Int32 manufacturerId, Int32 storeId, Int32 vendorId, Int32 warehouseId, Nullable`1 productType, Boolean visibleIndividuallyOnly, Boolean markedAsNewOnly, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Boolean searchManufacturerPartNumber, Boolean searchSku, Boolean searchProductTags, Int32 languageId, IList`1 filteredSpecs, ProductSortingEnum orderBy, Boolean showHidden, Nullable`1 overridePublished) in C:\andrei\nop_sources\src\Libraries\Nop.Services\Catalog\ProductService.cs:line 732
   at Nop.Services.Catalog.ProductService.SearchProducts(Int32 pageIndex, Int32 pageSize, IList`1 categoryIds, Int32 manufacturerId, Int32 storeId, Int32 vendorId, Int32 warehouseId, Nullable`1 productType, Boolean visibleIndividuallyOnly, Boolean markedAsNewOnly, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Boolean searchManufacturerPartNumber, Boolean searchSku, Boolean searchProductTags, Int32 languageId, IList`1 filteredSpecs, ProductSortingEnum orderBy, Boolean showHidden, Nullable`1 overridePublished) in C:\andrei\nop_sources\src\Libraries\Nop.Services\Catalog\ProductService.cs:line 582
   at Nop.Web.Factories.CatalogModelFactory.<>c__DisplayClass36_2.<PrepareCategoryModel>b__12() in C:\andrei\nop_sources\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 438
   at Nop.Core.Caching.MemoryCacheManager.<>c__DisplayClass6_0`1.<Get>b__0(ICacheEntry entry) in C:\andrei\nop_sources\src\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 83
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreate[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at Nop.Core.Caching.MemoryCacheManager.Get[T](CacheKey key, Func`1 acquire) in C:\andrei\nop_sources\src\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 79
   at Nop.Web.Factories.CatalogModelFactory.PrepareCategoryModel(Category category, CatalogPagingFilteringModel command) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 434
   at Nop.Web.Controllers.CatalogController.Category(Int32 categoryId, CatalogPagingFilteringModel command) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Controllers\CatalogController.cs:line 128
   at lambda_method(Closure , Object , Object[] )
2 anos atrás
I have the same issue. How do you do a view?
2 anos atrás
https://dev.mysql.com/doc/refman/8.0/en/create-view.html
on the terminal (shell) enter as root or with sudo:

mysql  
show databases;
use youNOP-DB-Name

create view AclRecord as select * from aclRecord;
commit;


Test the view:
select * from AclRecord;
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.