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.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Collection join to diffrent databases table

My Magento project has 2 connetions: default,whmanager. $joinConditions = 'main_table.product_id = catalog_product_entity.entity_id'; $collection->getSelect()->join( ['...
0
votes
0answers
63 views

Magento 2.4 Docker - Port must be configured within host parameter

I can start the setup via Command Line. And I get no Errors. But if i enter the homepage i got this error: [2020-11-03 23:11:17] main.CRITICAL: Port must be configured within host parameter (like ...
0
votes
0answers
19 views

Filter and sorting not working in custom culumn in upsell_product_listing.xml

I have joined column qty to Magento\Catalog\Model\ResourceModel\Product\Collection But Sorting filter by qty not working and sorting too in upsell_product_listing /app/code/Vendor/UpsellProducts/etc/...
0
votes
0answers
47 views

How to fix skip to content option in magento 2

I have issue with the magento2. When we open a website the skip to content appear before loading the complete website . How i remove this option. Image is atatched.
1
vote
0answers
31 views

The stock item was unable to be saved. Please try again. Magento 2.4.0

I installed magento 2.4.0 on my Linux server from godaddy. I'm unable to add the products to it. It is showing the Error is The stock item was unable to be saved. Please try again. Can any one help me ...
1
vote
0answers
69 views

Invalid entity_type specified: catalog_category magento 2?

I created a custom column using my custom module after that I removed that custom column manually from table mg_catalog_category_flat_store_1 magento 2 phpmyadmin after that this error accur in ...
0
votes
0answers
85 views

Magento 2 search 3 characters with hyphen not working

Magento 2 search 3 characters with hyphen not working Example - product SKU is 4-e - it gives lots of search results instead of related to 4-e results(not giving related with 4-e) there is no ...
0
votes
0answers
54 views

I have slow mySQL queries causing very slow backend when we do changes or editing

this can be confirmed from the following snippet, showing slow queries that are taking almost 3 seconds to run: | 1105858 | handyimp2_handydb | localhost | handyimp2_usrhand2 | Query | 3 | Creating ...
0
votes
0answers
31 views

Get data from DB (load method) Magento 2

I have controller, template, view. I need using load method, but i don`t know how i do that $post = $this->collectionFactory->create(); $this->collectionFactory->load($post, '...
0
votes
0answers
135 views

Magento 2.3 crashing on never-ending search_tmp_* queries

I'm using Magento 2.3.2 and a production site that has a decently large number of products. The site has been running fine for over a year but in the last week we suddenly have an issue where a ...
0
votes
1answer
16 views

Magento2.4 mysql to make all products a product type of simple

I imported all products into Magento2.4 using a plugin and just noticed 100 or so products have no product type which is causing them not to show on the website. How can I run a query on the database ...
0
votes
1answer
18 views

Magento 2 Image Gallery pure SQL Manipulation

I've written an interface for Magento 2 admin that allows creation and editing of key product attributes from a phone. Once a product is created and it's images attached to the product, I have been ...
0
votes
0answers
15 views

from host to another

i have magento 2.3 i restored databse and copy all file in directory of server 1 to server 2 change the name and username and password for database from env.php remove all file from var/...
1
vote
0answers
62 views

Using --no-tablespace option when backing up Magento 2 databases

I run a nightly cron job to back-up to backup my SQL databases using mysqldump. This has started to display the following error on all my databases: Error: 'Access denied; you need (at least one of) ...
0
votes
0answers
77 views

main.WARNING: Memory size allocated for the temporary table is more > than 20% of innodb_buffer_pool_size. Strange values

I'm receiving the following alert from Magento2: main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or ...
0
votes
1answer
24 views

Magenot 2 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'databasename.sales_order' doesn't exist

I'm getting an error when I navigate to the order grid section of the magento 2.3.4 under Sales -> Orders in the admin panel. It appears to be referencing the wrong table because table '...
1
vote
1answer
33 views

How to clean up all the Product Recommendation logs?

How to clean up all the register that I have in my database related to the Product Recommendation logs? Is it something that I can do from my side?
0
votes
3answers
190 views

Magento 2 - Check if record with certain value already exist in table before creating it

I created a new table company_shipping_quote. I am writing data into it like this: $quoteId = $quote->getId(); $html = $this->_generateNote($expressRule); $quoteModel = $this->...
0
votes
2answers
39 views

Magento 2 - Created new table and model - but model does not save!

I created a new table company_shipping_quote and new models by using https://mage2gen.com/. But how can I create a new object and save it so that it appears in the database? Models: Company/Shipping/...
0
votes
0answers
10 views

Magento 2.4.1: how to a separate and reuse a large database for products and categories from M2.4 shop db

any idea of how can I have products and categories in M 2.4.1 community in a separate database from the actual shop and reuse products and categories in for a new M 2.4? The database I need to share ...
1
vote
1answer
123 views

Magento 2 Admin - Product Cannot Add or Edit

I just upgrade Magento 2.3.0 to Magento 2.3.5, But after installation In Admin > Catalog > Products I cannot edit or Add new products, When I am trying to add or edit Product Page then getting ...
0
votes
1answer
52 views

Remove trailing and first space from sku

I have Magento 2.2.2. Some SKU products contain a trailing space. How to using data patch or MySQL database query which will remove all leading and trailing spaces from SKU products.
3
votes
2answers
565 views

Magento 2 not spawning consumer processes i DB (RabbitMQ)

I have setup Magento 2.4 with RabbitMQ. You can see my configuration here. 'queue' => [ 'amqp' => [ 'host' => 'rabbitmq.host', 'port' => '53003', 'user' => '...
0
votes
0answers
11 views

Add boolean value of false/0 where order exists in sales_order but not custom table

The code below I am adding my custom column to the sales_order_grid table. The problem is it only adds the values where order_id in my custom table exists. How can I add the value of false or 0 to ...
0
votes
0answers
19 views

Magento 2 How to get layered navigation filter based on category id

I want to get category filters and its values when I send category id to rest Api But in my case I am getting errors please see the below screenshot and code as well. Thanks in advance. protected $...
0
votes
1answer
32 views

How to have a CSV with customer, order and shipping information since a date?

I'm running a Magento Commerce Cloud B2B, and I need to get a CSV list of these data below, the most important data to me is the client's phone number which is inside the shipping information since a ...
0
votes
0answers
9 views

SQL query to report 1:N EAV attributes

I'm building a query to extract a report of products and relative authors. For Each SKU I can select n authors, authors attribute ID is 151. This query returns comma separated values for ed.value ...
0
votes
0answers
40 views

Get Attribute Customer in Magento2 with GraphQL

I created new attributes for customer but I want to insert them into a structure in graphql. Where there is an array called Garage with the new attributes. It is already being displayed normally in ...
0
votes
2answers
227 views

Getting SQLSTATE[HY000] [2002] Connection refused when running upgrade command for Magento 2.3

I am getting the following error when running the php bin/magento setup:upgrade command in my Magento 2.3 instance: SQLSTATE[HY000] [2002] Connection refused I can connect to the database using the ...
0
votes
1answer
28 views

Elasticsearch installation and MySQL RDS

I have elasticsearch installed in the same Magento 2.4 instant, but my MySQLdatabase is on AWS RDS, How should I configure elasticsearch?
0
votes
0answers
20 views

Optimize grid collection for huge data set Magento 2

I am working on creating an admin grid for sales_order_item table. There are probably a hundred million rows in the database and when I use the collection to filter and load data into the grid, it ...
0
votes
2answers
318 views

Invalid column data type when reindex Magento 2

I'm using Magento 2.3.4 for my website, when I try to reindex, the category flat was not reindex and appear error like this: I search some post in here and try this solution: magento 2.3.4 ...
0
votes
1answer
21 views

What's the purpose of the mview_state table in the database?

I saw the numbers increasing in the mview_state table in the database and there is no cleanup. So I wonder what's the purpose of this table and the values that we have there?
1
vote
1answer
27 views

Installation Error - Magento 2.4

I am installing Magento 2.4 with my (Magento 2.3 Database), but Now I am getting this error, anyone can guide me or give me any solution how to I can fix this issue ? Please check below screenshot. ...
0
votes
1answer
44 views

Magento 2 - change database column type

I need to change the type of the column "value" in the table catalog_product_entity_varchar from varchar(255) to varchar(512), but I find nothing in the documentation about how to do it, so ...
0
votes
1answer
417 views

How to get custom attribute value with product id of enable product with SQL query in Magento 2?

How to get custom attribute value with product id of enabled product with SQL query in Magento 2? I am using SELECT entity_id,value FROM catalog_product_entity_varchar WHERE attribute_id = 150 But it ...
1
vote
0answers
15 views

Having issue loading frontend on Magento 2.3

I am running Magento2.3 on AWS m5.xlarge (ubuntu 18.04) Backend is running pretty smooth, with page refreshes within 2-3 seconds, but frontend most of the time doesn't load and when it loads it takes ...
0
votes
0answers
13 views

Magento v1.9 cmd line sql query to find certain scenarios backorder out of stock

I have a real odd issue Magento v1.9.4.5 I have a ton like thousands of products that are set to back order allowed However they also say out of stock I need help I not sql expert I need a sql query ...
2
votes
2answers
339 views

scconnector_google_feed_cl error after product save (just upgraded to 2.3.5-p2)

I just upgraded Magento to 2.3.5-p2, now I'm getting the following error after saving products: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mg2.mg_scconnector_google_feed_cl' doesn't ...
0
votes
0answers
19 views

Magento 2: Performance testing error

I'm using Magento v2.3.4 and i ran this command to do performance testing php bin/magento setup:performance:generate-fixtures -s setup/performance-toolkit/profiles/ce/small.xml the process stop when ...
0
votes
1answer
13 views

adding extra column to the admin user table magento 1.9

I am tring to add new column to the magento admin user by scripting and manually also both are not working, when i try to add manually it is giving the error "Invalid default value for created&...
1
vote
1answer
40 views

Magento 2.3.4 - Server temp folder gets full because of SQL queries

I am using Magento 2.3.4, and the server temp folder gets full because of SQL queries. I am looking for someone who can optimize SQL server and queries from Magento 2. The below error appears when the ...
0
votes
1answer
44 views

Magento 2 delete Meta Name Meta Title Meta Description ALL products

Magento 2 delete Meta Name Meta Title Meta Description ALL products Please can someone let me know if its possible to delete the Meta Values for all products in my store These were added during import ...
0
votes
1answer
83 views

How to get SQL query for product insert in Magento 2?

How to get SQL query for product insert in Magento 2 ? I have multiple products around 10 Lakhs so i want to insert it using SQL query. But how will i get the insert query of the product ? Any Help is ...
0
votes
1answer
51 views

Truncate media_storage_file_storage table

The table 'media_storage_file_storage' is very big. Can I truncate this table if I use "File System" as "Media Storage"?
0
votes
2answers
94 views

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-General' for key

Run the upgrade command, and the issue should be face sudo bin/magento setup:upgrade Return during the process: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-General' for ...
0
votes
0answers
17 views

How to update data if already exist, otherwise Input new data?

The title says it all. How to update data if already exist, otherwise Input new data?
0
votes
1answer
44 views

which table to store data like simple product in Magento2?

which database table to store data like simple product in Magento 2 and its all related info. like custom attribute? Any Help will be appreciated.
0
votes
1answer
161 views

In which table in database Magento 2 product will insert with image and custom attribute?

What are the basic tables which need to use, so Product data will be inserted with image and custom attribute. Which is visible both in frontend and admin. Please Any one point out the table name for ...
0
votes
0answers
21 views

Error Code appears when editing product and category links no longer work on website

my website went down a few days ago, I use fast hosts, they reconnected my VPS but since then my category pages no longer work, products do not show on home page and whenever I save a product I get ...

1 2
3
4 5
71