Questions tagged [database]
Questions related to Magento's MySQL database, for example, the table schema, plain SQL queries or database configuration. For questions about the Magento database access layer, use other tags, like: eav, model, resource-model, collections, install-script. For questions about SQL queries in particular, the SQL tag is appropriate too.
3,499
questions
1
vote
3answers
31 views
I want to fetch Product Names on behalf of comma separated SKU's
I want to fetch Product Names on behalf of comma separated SKU's i.e. sku1,sku2,sku3 and the expected result is Name1,Name2,Name3
0
votes
0answers
10 views
How to export products with tier prices directly via database using SQL?
I want to export these data from my Magento 2.3:
Status
Product Name
SKU
Price
Advanced Pricing
Quantity
How could I do it via SQL?
0
votes
1answer
11 views
'TABLE 607 WHERE `Non_unique` = 1' - Setup Upgrade Error
When i run this command (setup:upgrade) in Magento 2. Then i am getting this error.
Please tell me how to i can fix this issue. which table is 607 ?
Syntax error or access violation: 1064 You have an ...
0
votes
0answers
6 views
How does catalog_category_product ( Category Products ) reindexer works according to mysql in Magento 2
I want to know about catalog_category_product ( Category Products ) indexer in Magento 2 like how it will work according to mysql.
Like in which table's it will enter the data then further which table ...
1
vote
1answer
28 views
Table in MySQL to show product data in Magento 2 after reindexing process
I want to know about those MYSQL tables which is used to fetch data for Front-end Products in Magento 2 after re-indexing process.
Like which table will be used after re-indexing process to show ...
1
vote
0answers
22 views
Magento 2: What is the purpose of “_replica” tables?
I'm newbie in Magento but I have a store that started in 2.2 and is now updated to 2.4.1.
What is the exact purpose or _replica tables? The only mentioning is that they help prevent deadlock but how ...
0
votes
0answers
40 views
magento 2.4 Impossible to process constructor argument Parameter #0 [ <required> Magento\Framework\Search\Adapter\Mysql\Mapper $mapper ]
I am getting below error
Impossible to process constructor argument Parameter #0 [ Magento\Framework\Search\Adapter\Mysql\Mapper $mapper ] of Amasty\Shopby\Model\Search\Adapter\Mysql\...
0
votes
0answers
13 views
Catalog product and Stock index Error
I am getting this strange error while reindex, and I cannot find any solution on google or on stackoverflow.
Stock index exception: SQLSTATE[42S01]: Base table or view already
exists: 1050 Table './...
0
votes
0answers
11 views
How to check the result of temp and replica table in Magento 2 indexing
I have running indexer index command in Magento 2 for 60 million products.
But when i check in back end after 2 days it will show processing catalog_category_product and when i have go to error log ...
0
votes
2answers
24 views
Address Options > Number of Lines in a Street Address
I am experiencing a problem in my magento 2 store.
I cannot set the line quantity in Settings> Client Configuration> Name and Address Options> Number of Lines in Address
I can put any value 1,...
0
votes
0answers
13 views
Search for a deleted table's reference id in all tables, rows and columns of a DB
I had copied the table structure of table 'url_rewrite' and created a new table named 'url_rewrite_new' with empty data in my Magento 2 store DB, also renamed the 'url_rewrite' table. Then I ran ...
0
votes
0answers
14 views
Save config.xml value on install/upgrade
I have just created system.xml and config.xml for my project - they work ok after implementation:
The values don't get written to the database unless I press save in admin though - ran setup:upgrade ...
0
votes
0answers
14 views
Magento database optimization slow query
my website was getting internal 500 error intermediately, my hosting provider(siteground) told me that the magento database was running slow queries ( 80 in the past 24 hours), which cause spikes on ...
0
votes
2answers
15 views
How can we import db in magento2 cloud project
I want to import SQL file in cloud project magento2.
by ssh i login and import db then i am getting mysql server gone away after little time later.
0
votes
3answers
32 views
Get reviews by SKU and id using SQL query in Magento 2?
I want a SQL query to get product reviews by SKU using Magento2 for example,
It should contain,
SKU,id,title,discription,name
Please help me someone for the same.
since I am new to Magento 2.
1
vote
1answer
25 views
Setup:upgrade error. Base table or view not found
Any ideas how to resolve below error please?
Installing schema... Upgrading schema... SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm2.email_template' doesn't exist, query was: SELECT ...
0
votes
0answers
16 views
Magento Cloud DB Backup Related query
I know this is not right question to ask here but still want to discuss here.
Anyone know how to request DB backup of olddays from magento cloud support team. They are saying that magento cloud ...
0
votes
1answer
35 views
When I am trying to run setup:upgrade its always gives below error,
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE 446 ...
1
vote
1answer
33 views
How to create table database and data saving into the table in Magento 2 [closed]
I want to add a table into the database and get input from a custom form
0
votes
1answer
23 views
Possible to using SQL query to get last 30 minutes created account from Magento?
Possible using SQL query to get last 30 minutes created customer account from Magento? I want to run a cron job that it can get the last 30 minutes created customer account id. so base on ID, I can ...
0
votes
1answer
14 views
Data Migration Tool with splitted database
I would like to migrate data from my Magento 1 website to the new Magento 2 one.
In the Magento 2 instance, I've splitted the database for performance reasons (https://devdocs.magento.com/guides/v2.4/...
0
votes
1answer
24 views
Failed to read auto-increment value from storage engine catalog_product_entity_varchar
Can't add a new product and get an error.
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine, query was: INSERT IGNORE INTO catalog_product_entity_varchar (...
0
votes
0answers
14 views
SQLSTATE[42S02] at Admin Login
Using Magento 2.3.3. happy_mage300 database in phpmyadmin
There has been an error processing your request
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'happy_mage300....
0
votes
1answer
11 views
Fetch data and arrange sequence in given format
This is my array:
<?php
$sku = ['HH017','HH018','HH005','HH010','20OZHHTUMBLER',
'30OZTUMBLER2','HH006','HH-05'];
$sequence = ['HH005','HH010','HH006','20OZHHTUMBLER',...];
print_r(sort($...
0
votes
1answer
16 views
Magento 2 Update mass Product description using $mysqli->real_escape_string() using core php root script
After migrating all data from Magento 1.9 aproximat 800 product have static image urls in descriptin.
{{skin url="images/seringue.gif"}}
So I have created one root script to update all ...
0
votes
0answers
21 views
How to use Magento 2 with MariaDB Data-at-Rest Encryption for HIPAA compliance
As one of the requirements for HIPAA compliance is to store all Protected Health Information (PHI) encrypted at rest, and since customers, quotes, orders will be considered as PHI, I thought that ...
0
votes
0answers
35 views
If I run setup:upgrade its giving below error
I have uploaded new module and trying to upgrade its giving below error.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds ...
0
votes
1answer
21 views
SQL query to get products enabled, in stock without images?
I'm running a Magento 2.3 and I would like to run a query in my database to export some products data that I don't have natively via the admin panel, the attributes are:
Status
Stock
Images
How ...
0
votes
1answer
19 views
Change stock availability of products based on qty
I'm looking for a query to get all my products that have "qty > 2 and 'stock availability = 0'" and change the stock availability to 1.
A crash on my inventory update routine did a mess ...
0
votes
2answers
36 views
how do I change this sql query to magento get data method?
I have below sql query, how do I turn this to Magento get data method to retrieve data? Please help
SELECT sales_order.increment_id, sales_order_payment.additional_information FROM sales_order LEFT ...
0
votes
0answers
14 views
Magento 2 with redis site not loading
I have configured the Redis cache as per Magento documentation. But if I run the cache:flush command the site loads lot of time and I'm using AWS RDS, The CPU of the RDS instance is 100% used. I also ...
0
votes
0answers
32 views
export magento 2 database with different method
i used Ubuntu OS and now mysql is not work, when i export database using ssh command in local terminal,
i used this command for export DB :
mysqldump -u root -p fastestsample > fastestsample_bkp....
0
votes
1answer
12 views
Set all categories to use Config Settings for 'Default Product Listing Sort By' option via SQL
I want to set all of my Magento 2 categories to 'Use Config Settings' for the 'Default Product Listing Sort By' within the Category Display Settings.
I don't want to do this manually as there are ...
1
vote
1answer
11 views
where I can find all the order numbers from the Database table?
where I can find all the order numbers from which Database table? I did some research, but I don't see sales_flat_order in my database. Please help
0
votes
0answers
25 views
How do I change the code in a Magento 2 extension without editing. I need to import csv file, but it will reflect the two tables in database
How do I change the code in a Magento 2 extension without editing it's files directly. I need to import csv file, it will reflect the two tables in database.
0
votes
1answer
22 views
Find all SKU products with tier price?
I want to compare products with tier prices from two databases. From database Magento 1 and Magento 2. Compare them to generate a list of products from Magento 1 that do not have tier prices in ...
0
votes
0answers
17 views
Magento 2.3.5 - Flat Catalog module has a limit of 64$d filterable and/or sortable attributes
I'm getting the error below during my setup:upgrade:
The Flat Catalog module has a limit of 64$d filterable and/or sortable
attributes. Currently, there are 67$d of them. Please reduce the number
of ...
0
votes
1answer
20 views
How can I know from which file the table error is coming for?
I updated some modules and went up this "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_prod.amazon_nding_authorization' doesn't exist, query was: DESCRIBE ...
0
votes
0answers
9 views
Magento 2 error: lock wait timeout exceeded. query was: update session set session expired =?
Some of my customers get this error randomly. And there are sleep query commands in mysql with no info.
How can I solve this?
0
votes
1answer
24 views
Update SKU, Product Name, Product URL key via database
I would like to ask for a help or hint, how to update SKU, Product Name, Product URL Key via database. My reference (key) is old sku and I have all data in excel sheet. I have about 600 products to be ...
0
votes
2answers
22 views
How to add tables to database with foreign key?
I'm trying to extend costumers to add some wholesale info we need, so I'm trying to create a module with an InstallSchema to create, let's say, the table 'wholesale_info' with some columns and getting ...
0
votes
0answers
14 views
Foreign key checks not working while running datapatch
I've created this datapatch to migrate some attributes (width, height, depth) from a varchar attribute to the decimal counterpart. Since both have been in de database for a long time I have to account ...
0
votes
1answer
23 views
Inventory View inventory_stock_1 causing database locks
After moving databases we are getting spikes in our database from PDP pages with the following query, and it ends up taking a full minute to query.
SELECT `inventory_stock_1`.`quantity`, `...
0
votes
0answers
21 views
Filter product collection with nested OR/AND statements
I want to make a query as below
WHERE manageStock = 0 OR (manageStock = 1 AND productStatus != 0) OR (manageStock = 1 AND backorderStatus = 1)
but I can't use $collection->getSelect()->where() ...
0
votes
0answers
18 views
Internal Server Error
I just hosted on Godaddy, and i downleded magento 2.3.6 from magento official site and i uploaded it into filemanager, when i run the URL, it is showing 500 error.
Can you please guys help me this.
...
1
vote
1answer
34 views
Upgrade Magento 2.3 and store code base is not found
I upgraded my Magento 2.3.1 to 2.3.6, I'm seeing this message in the frontend.
The website with code base that was requested wasn't found. Verify the website and try again.
How could I fix it?
0
votes
0answers
69 views
Reindex process hangs and blocks website
I have a problem in my Magento 2 (version 2.3.4) shop that reindex process sometimes runs indefinitely and brings the whole site down (502 nginx error or timeouts).
I noticed on the DB level, that in ...
0
votes
1answer
20 views
Magento 2.3 localhost Blank page Frontend and admin
I'm trying to transfer my test site from web space to local (I'm running low on maximun allowed size)
I've downloaded my database and a copy of the site.
Through Xampp I've imported the database, I've ...
0
votes
1answer
28 views
Magento2 custom sql to get data from external table and import into product
In Magento2 I am trying to connect to an external database and table and use the data to update a custom product attribute where the sku' match in both tables. I temporarily put this code in my footer....
0
votes
1answer
18 views
Can not display all column from a table
I have a table name my_cars. There are 4 column in my table. I create collection, model, recourse model,controller and block. And i can display data from my table. But all column of data not ...