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
9 views

get checkout value for new field Magento 2

I have created a field in Frontend which is a datepicker. I have used a plugin <type name="Magento\Checkout\Block\Checkout\LayoutProcessor"> <plugin name="date_picker" type="Module_Name\...
0
votes
0answers
31 views

Empty additional_attributes Table Magento 2

Please, can someone let me know how I can empty the additional_attributes for all of the products on my site? Due to some import issue, wrong information has been imported and when I exported CSV it ...
0
votes
0answers
16 views

Magento 2 Qty Data not found in Delivery Note (bundle product)

i have a problem with Magento 2. I use M2 2.3.2 and have an error in generated PDFs. If i place an order (Frontend or Backend) and process it, all works fine. After the shipment was generated and the ...
4
votes
3answers
1k views

Magento backup taking too long

So, I decided to make a database backup from the magento admin panel. But it´s taking too long and there´s no way to know if the backup is actually working or if it got stucked. Is there a way to stop ...
0
votes
2answers
870 views

Import Database Error: #1062 Duplicate entry '3-13-70-0' for key

I am attempting to export the Magento database from my current installation to a test installation before I have the test installation go live. Both installations are version 1.9.2.1. I can ...
0
votes
1answer
843 views

Magento 2 add new column to existing table on a running webshop

I know there are few posts regarding how to add new column to existing table in Magento 2. My concern is if I already have a webshop that is running, can I still add a new column to a table? for ...
5
votes
2answers
604 views

SQL query kills entire server

I caught the following query via mysql's SHOW FULL PROCESSLIST; which was eating the whole CPU / RAM on my server (32GB Ram, i7 hexacore CPU) rendering the entire server unusable for more than 3 hours....
0
votes
2answers
625 views

Magento 1.9 How to use old database while installing fresh magento

I wish to install fresh magento 1.9.2.3 using the same database of magento 1.9.2.2 During installation process when I give the same database name as of magento 1.9.2.2 It shows error as"Database ...
0
votes
1answer
787 views

Base tables already exist

Hi guys I have been trying hard to upgrade a magento 1.3.2.4 to magento 1.7 but it is not playing ball: it keeps saying that the base tables already exists. In particular these are: index_event, ...
1
vote
3answers
595 views

Magento 2:- How to get customers now online?

Magento 2:- How to get customers now online? Want to get all customers data current login.
7
votes
1answer
9k views

Magento 2: Where is cart data saved?

Magento version: 2.0.0 When user add products into cart, where are they saved? $_SESSION or Database? If it is in database, which table?
0
votes
2answers
19 views

How to update product name for main website and all store

I am updating the product name and it only affects the En store view I want to update product name for all store views and main website as well. see the sample code below $sku = 'E20630'; $...
0
votes
0answers
11 views

DB script for search and replace a word from entire database

I want to make a DB script for my Magento 2 site. I want it to search a specific word and replace it from another.I have seen other links that show how to replace but those are the queries. I need a ...
0
votes
0answers
9 views

Magento 2 : What tables should be created to make product price Store-view wise? [ Multi Storeview Pricing ]

I want to create functionality like product prices can be set at the store-view level for that I've added one more option as Storeview in a configuration for Stores > Config > Catalog > Catalog > ...
1
vote
1answer
21 views

Sales order vs sales order grid

What is the difference between these two dB tables? I can see for the data, the sales_order_grid appears to be a subset of sales_order. Is this true? What is the purpose of having duplicate tables (I ...
1
vote
0answers
12 views

Unable to create duplicate product in Magento 1.9

I have tried to create a product using the duplicate product in Magento 1.9.3.1. It gives an error as follow
3
votes
2answers
162 views

{“0”:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name'

Any Help Highly Admired, i'm using Magento 2.2.8 did all commands,upgrade, reindex, static file , etc still not worked {"0":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in '...
1
vote
0answers
40 views

How to set the value of checkbox in gift_message to the database

I have added a custom checkbox to my magneto cart page for gift message. I want to add value 1 to the gift_message table's "remove_tag" column (which i added) if the checkbox is checked. How can i ...
1
vote
1answer
858 views

Retrieving size attribute text via MySQL in Magento 2

I'm working on a PHP file that will run on cron (outside of the Magento 2 directory). I'm writing some scripts that fetch various data such as customer details and the items they've ordered. ...
0
votes
1answer
22 views

How does sales_quote and sales_quote_adress table relate?

In the sales_flat_quote table, there is a store_id column. In my perspective the customer order in the front-end (website) and in the back-end, Magento creates each quote for different stores, if my ...
0
votes
0answers
15 views

Magento 2 : How connect Magento with Neo4j Graphical Database

Does any one know how to connect Magento 2 with Neo4j Graphical Database ? There is a PHP client library (composer require graphaware/neo4j-php-client:^4.0) which i have updated in Magento project, ...
0
votes
0answers
8 views

Magento 2.3 mysql version from 5.6 to 5.5 [duplicate]

I know this is an old question but I couldn't find any solution to it. Currently i am having issues with mysql version on my server. i have mysql 5.5 but magento 2.3 requires 5.6. Is there a way to ...
0
votes
2answers
417 views

Production Mode app:config:import issue

after a new deployment I get the following error: {"0":"The configuration file has changed. Run app:config:import or setup:upgrade command to synchronize configuration.","1":"#0 \/var\/www\/dev.xxx....
0
votes
1answer
81 views

Soft delete or Hard Delete

I have very very simple general question. Is Magento using soft delete or hard delete for table records? If its using hard delete means, what is the reason? why we are not following soft delete?
0
votes
1answer
26 views

Unable to find Multi Store Links in magento 2.3

I am new to Magento. I have installed FreeGo theme in my Magento 2.3.x and I've created Multi Stores in Admin Panel but how can I view them? I am unable to find links to view them. Not in the footer, ...
0
votes
1answer
794 views

MySQL-Query: GROUP_CONCAT() doesn't work correctly

I try to execute this SQL-query, but I don't get the right result: SELECT k.product_id, product.sku, group_concat(i.value) FROM catalog_product_super_link AS par LEFT JOIN staging....
1
vote
1answer
29 views

Magento 2: MySQL Issues

When using Magento2 backend, I’m running into a lot of timeout errors (from cloudflare and from nginx (when cloudflare is disabled) ). These timeout errors happen when i'm trying to insert / update a ...
0
votes
3answers
67 views

Magento 2 upgrade 2.1.7 to 2.3.2 give error Foreign key constraint is incorrectly formed modify column customer_group_id in table of customer_group

Can anyone please explain about this type of error Like http://prntscr.com/oow1oz Also, I refer to this link Magento 2 failed database rollback cannot add foreign key constraints but not working for ...
0
votes
3answers
123 views

Get Product id in magento2

Get product_Id using following query, public function getProductsIdBySku($skus) { $select = $this->getReadConnection() ->select() ->from($this->...
0
votes
2answers
269 views

Magento2: Asymmetric transaction rollback

Sometimes I found in log file issue: Ran jobs by schedule. string(32) "Asymmetric transaction rollback." Ran jobs by schedule. Ran jobs by schedule. Ran jobs by schedule. Anyone know how it is and ...
6
votes
0answers
221 views

what populates data in cataloginventory_stock_status table and from which table

In magento2 - I would like to understand what populates data in cataloginventory_stock_status table and from which table the data is transferred in this table. I tried searching in ...
1
vote
1answer
1k views

Select Release_lock(?) error while reindexing - magento 1.9

I have a strange error with a reindex process in a Magento 1.9 installation. The trace shows a "MySQL Server Gone Away" error when trying to reindex in the web interface and via ssh. The error occurs ...
0
votes
1answer
26 views

Magento 2.3 Mysql Showing Upgrade Compilation Error

When i run php bin/magento setup:upgrade in cmd, then i'm getting this error. anyone can help me, why this error is showing ? website is working fine but i want to fix this error. Plz help if someone ...
0
votes
0answers
20 views

Incorrect Order State

In magento1, In some of my orders, the state seems to be corrupted (or I am thinking this way). There are some pending orders which are not getting cancelled or confirmed. They are in pending state ...
2
votes
3answers
282 views

connection “developer” is not defined

Anytime I run this to install any extension: php bin/magento setup:upgrade. I get the error - connection "developer" is not defined. I have tried to change the mode to developer and when I run it,...
1
vote
3answers
8k views

Magento 2 : Unique constraint violation found when adding product, categories or mega menu items

I have a Magento 2.2.3 installation and I have the theme SM-Maxshop on that. I am not able to add any products, categories or Megamenu items to it. I get an error "Unique constraint violation found" ...
2
votes
0answers
503 views

Magento2 : How to join table with where condition using getSelect()?

I am new Magento 2.2.3. I am trying to fetch data from custom table and display the same in UI components. Everything will work but If I use where clause with getSelect then UI component will show "...
2
votes
5answers
80 views

Magento 2.1.3 Extremely High MySQL CPU Usage

We recently started having big issues with our website slowing down quite often due to maxed out CPU usage (MySQL process using 200% CPU). The CPU usage is constantly at 60-85% and maxes out multiple ...
0
votes
0answers
23 views

Upgrading Magento 2.2.9 to 2.3.2 missing email_abandoned_cart mysql table

I recently installed a new Magento that was originally 2.2.2 . However the theme i am using then just came out with a updated theme for 2.3.2 so I uploaded that one and upgraded my Magento to 2.3.2 ...
0
votes
0answers
8 views

BSS MultipleStoreViewPricing enbled error

we have a problem after install BSS MultipleStoreViewPricing module ,we trying to enable the extension Stores then Configuration then Catalog.Store View to enable the module. Save Config the problem ...
0
votes
2answers
27 views

How to get data from custom table without using object manager

I want to insert data in custom table "outofstockproductnotification". But before insert data, I want to check if some data like email id and product id is already exist or not in my custom table. I ...
3
votes
3answers
175 views

Magento 2 - Docker - Data not persisting

I'm currently running Magento 2 on Docker using docker-compose.yml here is the file: version: '3.0' services: web: image: alexcheng/magento2 container_name: magento2 ports: - "80:...
0
votes
1answer
591 views

SQLSTATE[42000]: Syntax error or access violation:Magento

I am start getting this error suddenly how i can resolve this inorder my site work fine: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'yukamagentonew'@'173....
0
votes
0answers
13 views

BSS MultipleStoreViewPricing error [duplicate]

Dears, I have a problem in Magento 2.3.2 . - BSS MultipleStoreViewPricing Module It shows error I run the below command php bin/magento setup:upgrade Please check attached screenshot of error enter ...
0
votes
0answers
5 views

Constraint “quote_to_store” references exception table in magento 2

After importing database I am getting Exception #0 (Magento\Framework\Exception\InputException): Constraint "quote_to_store" references table that does not exist. unfortunately, no answer found ...
0
votes
2answers
617 views

Magento very high connections

Magento is creating 700 + connections leading to database breakdown whenever cache is flushed or indexing is triggered. Production site remain down for 20 mins till all connections clears. All ...
0
votes
1answer
17 views

How to list unused attributes options by sql query

I would like to list all attributes options that our products don't uses. I prefer to use SQL to do that to learn how to work with. Right now i use this query to get the ID of my attributs select * ...
0
votes
0answers
38 views

Magento 2 : How to retrieve 'custom quote params' from quote object after order placed

I want to retrieve custom params saved in the table: "quote_item_option" I have built an observer to capture the purchase event and also to retrieve the quote object i.e public function execute(\...
0
votes
0answers
24 views

Assoicated Products relation with Main Products, SQL Query

Our magento store products have three drop downs like color, size & weight. The price of main product changes when we select from size or weight etc. Stuck to run a query to get assoicated ...
1
vote
1answer
67 views

Bulk updating product prices : Magento 2

In my M2 store I have over 200k products. They were added manually through API (https://domain.com/rest/all/V1/products call). Nowadays prices of my products are changing frequently and I need to ...