Magneto website:
SQLSTATE[42S02]: Base table or view not found: 1146 Table mysite_mage1.catalog_product_entity doesn't exist
This table exists but has a different name in my data base and it is one category further.
My table is named
mysite_mage1.mage_catalog_product_entity
I don't have access to the module's code, I cant change the name of the table it is looking for, I believe I cant I change the name of the table in mySQL database.
Related
There's a table in a database of mine, let's call it table_x, that used to get created and destroyed all the time. Now that's not happening, so the table should either exist or not, and actually it should not.
When I try to get a mysqldump of the database I systematically get this error:
Error: Couldn't read status information for table table_x ()
mysqldump: Couldn't execute 'show create table `table_x`': Table 'xxxxx.table_x' doesn't exist (1146)
Like mysqldump for some reason still thinks that the table exists and when it tries to dump it it triggers the error.
SHOW TABLES does NOT show the table.
However in information_schema.TABLES it's present.
I guess that's the problem, that information_schema somehow got out of sync with reality.
How do I "repair" this inconsistency?
I tried deleting the table with
DROP TABLE table_x
but unsurprisingly I get an error that the table doesn't exist.
To avoid such kind of error during drop a table it's a good habit to use IF Exist and IF NOT EXIST as:
DROP TABLE IF EXISTS table_x;
CREATE TABLE IF NOT EXIST table_x;
I am not able to resolve this error, and the tables based on code ect ect everything is correct and created.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fregmg.jfmg_ppi' doesn't exist (SQL: select count(*) as aggregate from `jfmg_ppi`)
in Connection.php line 647
It is what the error tells you. There is no table with this name in the selected database
I am currently trying to do the following in a Laravel 5.4 project
$this->belongsToMany(Module::class,'platform_modules_acquired', 'platform_id', 'module_id');
Now the module class pulls from a table in the admin database while the table platform_modules_acquired is in the clients database. When I try to run the above code I get an error saying platform_modules_acquired table can't be found in the admin database.
I tried changing the above request by saying that the table is clients.platform_modules_acquired but still not finding the table. Also I tried appending ->using('PlatformModules::class') but still getting the same error...
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin.plataformas_modulos_contratados' doesn't exist (SQL: select 'module' from 'modules' inner join 'platform_modules_acquired' on 'modules'.'id' = 'platform_modules_acquired'.'module_id' where 'platform_modules_acquired'.'platform_id' = 187)
How could I go about telling this relation to look in the clients database for the table?
You can use a connection inside the relation like this:
$this->belongsToMany(Module::class,'clients.platform_modules_acquired', 'platform_id', 'module_id');
I have just tried to add a custom order for testing purposes but I get this error:
Order saving error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_.sequence_order_1' doesn't exist, query was: INSERT INTO `sequence_order_1` () VALUES ()
How can I solve this issue?
The error strong said that table hast not found in database.
so the things that you can do.
1.check the database is table exist or not
2.if table exist then look properly is your table name correct in the script
I created a database named "Records" in MySQL within which I created a table named "old_records" having 5 columns. When I give the command:
USE Records;
SHOW TABLES;
it displays the table named "old_records" which is existing in the database, but after that when I type the command:
DESCRIBE ORDERS;
it gives the following error:
ERROR 1146 (42S02) Table 'Records.orders' doesn't exists
I am very new to MySQL and not able to understand the cause of this error, please help.
You should use
DESCRIBE old_orders;
You've already said that the orders table does not exist, you cannot DESCRIBE something which doesn't exist