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
1
vote
1answer
18 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
39 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
24 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
7 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
54 views
+50

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
20 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.
2
votes
2answers
51 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
10 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
11 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
12 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
8 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
16 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
18 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
17 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
6 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
0answers
29 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
12 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
22 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
10 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
67 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
9 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 ...
0
votes
2answers
69 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
12 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
7 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
0answers
23 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
27 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
31 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
21 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
30 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
15 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
25 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
27 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
18 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 ...
0
votes
0answers
10 views

CMS page save with “from” and “select” words in Magento 2

Is there other way to save "from" and "select" words in CMS page without disabling ModSecurity module?
0
votes
0answers
42 views

Stuck due to waiting for table metadata lock

sometimes, when i run the setup:upgrade command, magento2 stops on Magento2 Indexer (Runnign data recurring) for hours. Reading processlist under mysql server it looks like there is a problem on some ...
0
votes
0answers
9 views

Magento 2 Output Custom Category Attribute

I created a custom category attribute attribute - Category Heading - That I want to display on Category pages (specifically taking the place of the category H1s in title.phtml). The new attribute ...
0
votes
0answers
22 views

The search term shows SQL injection in magento 1.9

I have found below search term on my magento 1.9's admin panel: epoxy) UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL-- QBrO ../../../../../../../../etc/passwd AND 1=2 UNION SELECT ...
0
votes
0answers
11 views

MySQL 5.7 migration error

I have some issues regrading migration from ubuntu (Server 1) to windows MySQL (Server 2). First of all, I had installed MySQL migration tools on Server 2, and when i try to migrate the data, Server 1 ...
0
votes
1answer
10 views

Magento 2 Db migrate

I'm having a magento with thousands of product and attributes. I have to just add the product in new install magento without any configuration changes in new magento. Any option to migrate database to ...
0
votes
1answer
21 views

Move house number from street 1 into street 0 for existing address in db - Magento 2.3.5

At the moment we use the street 1 field for the house number in our Magento 2.3.5 store. But we want to revert this and only use 1 street field for both the street and house number. So we need to move ...
0
votes
0answers
16 views

Magento 2.3 How to apply coupon code discount on regular price

When I apply a coupon code on the cart, it gives a discount on the final price if a special price is set. But I want to apply a discount on a regular price ( If a special price is set on that product) ...
0
votes
1answer
18 views

How to get customer and company data in a CSV file from MySQL?

I'm running a Magento Commerce Cloud B2B, and I need to get a list of these data below. Customer ID Customer Name Company Name Company User Agreement As I can't export a file with these pieces of ...
0
votes
0answers
11 views

RDS parameter group for Magento

I am running Magento 1.9.3.8 on EC2, database running MariaDB 10.1.34 on separate AWS - RDS instance which is db.r5.xlarge vCPU: 4 RAM: 32 GB I have defined various MYSQL variables under custom RDS ...
0
votes
1answer
37 views

What version of MySQL is actually supported?

Was running Maria DB 5.5, tried to install Magento CLI 2.4.0, Amazon Linux / nginx Got this error. Sorry, but we support MySQL version 5.6.0 or later. Ok. So I install MySQL 5.6. It seems to be ...
0
votes
1answer
43 views

MariaDB or MySQL Magento 2.4 “magento community edition open source”

We are in the process of planning for an eCommerce project with Magento 2.4 "magento community edition open source" for building up the e-commerce project. But we are really confused with ...
0
votes
1answer
58 views

Magento2 Elastic Search Configuration Issue

I am using following configurations for my magento2 project Ubuntu 18.04 PHP 7.2 MYSQL 5.7 Elastic Search 7.x Magento 2.3.5-p1 When i enabled elastic search in magento2 admin panel , the connection ...
2
votes
0answers
16 views

How to switch from Mysql 5.7 to 8.0 in Magento 2.4

I was developing Magento 2 with MySql 5.7 but on production server there is MySql 8 installed which is giving me some query errors. After following a guide of migrating from MySql 5.7 to MySql 8.0 it ...
0
votes
2answers
22 views

Get all products that have a custom attribute of a value

Ive made a new product attribute called "product_price_family" in magento2 admin panel. This is a dropdown value. I have changed the value of product_price_family of 5 products to "test&...
0
votes
0answers
11 views

Magento2 fetch value from catalog_compare_item table

Magento2 How can I get the value of following table 'catalog_compare_item' using a model or any other proper way of Magento?

1
2 3 4 5
69