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,729 questions
0
votes
1
answer
64
views
I can't get the data patch to show a new attribute in admin panel
Create a data patch to add a new attribute to the customer, for example when registering a new customer, in the admin panel it must be possible to view the new field (e.g.: Customer Code) and make the ...
0
votes
0
answers
55
views
Magento tables deleted automatically
We are using magento 2.4.4 version for our website yesterday we observe that all tables related with magento got automatically deleted, what will be the possibel reason and how we find the RCA
0
votes
1
answer
73
views
Magento 2 extremely slow reindexing after server migration (21 hours for 200k products)
Magento 2 extremely slow reindexing after server migration (21 hours for 200k products)
After migrating our Magento 2 store to a new dedicated server, we noticed that full reindexing now takes around ...
0
votes
0
answers
30
views
After running setup:upgrade cmd 'magento2.core_config_data' doesn't exist in engine
After running the cmd php bin/magento setup:upgrade I am getting following error.
[2025-03-07T07:07:05.311272+00:00] main.ERROR: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'magento2....
0
votes
0
answers
23
views
In windows Xampp MySql Start issue
Instead of close i did exit in xampp, whenever i exit xampp i am facing MySql start issue.
Again and again i am reinstalling the xampp.
How to solve the issue, how star my MySql.
MySql Error:
2025-03-...
0
votes
1
answer
75
views
Is slave - master model dangerous through Magento 2 CE?
We're using Magento CE 2.4.6, and we're looking for implementing slave-master scheme to make our infrastructure more robust and faster. I know this implementation exists on the Magento 2 Entreprise ...
0
votes
1
answer
434
views
Magento 2.4.7-p3 indexation problem
Hi everyone and happy new year
I'm not able to complete indexing and get some errors. Any clue?
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt ...
0
votes
0
answers
51
views
Magento Open Source Extension for handling Master-Slave DB connections
Do you know of any extension for Magento Open Source that functions similarly to Adobe Commerce's Magento_ResourceConnections for managing master-slave database connections?
In Adobe Commerce, these ...
2
votes
1
answer
342
views
Downgrading Adobe Commerce to Open Source
What would be the steps to safely downgrade the database of an Adobe Commerce project to Open Source?
0
votes
0
answers
45
views
Foreign key constraint while saving Configurable Product in Magento 2
We are Saving Configurable Products using Pim(pimcore) through a custom Module in Magento, while saving configurable Products,we are getting this below Foreign key constraint Erorr,
SQLSTATE[23000]: ...
0
votes
1
answer
83
views
SQL Foreign Key issue preventing setup:upgrade from completing
I am running into an issue when trying to run setup:upgrade, to where it fails with saying;
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP '...
0
votes
1
answer
165
views
My magento 2 website is freezing and stuck due to debugger
(function anonymous(
) {
debugger
})
I am getting this in source tab and whole website is freezing because of it. I have not added this code anywhere. How to find out what is the exact issue.
Also ...
0
votes
1
answer
166
views
install Magento 2.4.7 with a database 2.4.5
We are working with Magento version 2.4.5 and want a clean (new) installation of the latest version 2.4.7 while retaining our current database with 2.4.5, of course.
What is the most sensible sequence:...
0
votes
2
answers
118
views
Magento 2.4 open source reindexing issue
I have 600000 products, 6000 categories and multiple attributes set and attributes
10 stores and 20 store views
This will create large set of data in Magento 2 open source in eav and creates indexing ...
0
votes
1
answer
40
views
Trouble installing magento on Mac OS, issue with MySQL
I am getting this error when trying to setup Magento from the terminal on Mac OS localhost.
SQLSTATE[HY000] [1045] Access denied for user 'magento'@'localhost' (using password: YES)
In InstallCommand....
0
votes
1
answer
254
views
Magento 2.4.6 Elasticsearch not working and upgrade command use that phase issue
Could not validate a connection to Elasticsearch. Unknown 401 error from Elasticsearch null
curl -X GET 'http://localhost:9200'
{"error":{"root_cause":[{"type":"...
0
votes
2
answers
150
views
Magento2 - Migrating the database from one server to another
I am in the process of migrating a Magento2 website from a single dedicated server to a split setup with Magento on one server and the Database on it's own dedicated server.
What is the recommended ...
0
votes
1
answer
72
views
Where is this query coming from?
I noticed my DB CPU creeping up and hitting 100% this week. Looking into the MySQL process list I saw 4 instances of the same query running. These queries never finish though, one has been running for ...
0
votes
2
answers
34
views
Magento 2 : Saved data not in DB after throw new LocalizedException
save some records to DB and after throw LocalizedException, the saved data does not show in the table. auto increment ID is assigned
$data = [
'sku' => $f_sku,
'user' => $...
1
vote
0
answers
158
views
Magento 2: How to add two index for the same column in DB with db_schema.xml
I have a column name in my db_schema.xml, I want it to have the unique property and also fulltext, when I add these two fields it returns an error that said Index Name already exists, this is because ...
0
votes
2
answers
138
views
Where is the file with all customers details (last log-in date)
Where is the folder that contains the information of registered customers?
I need to extract the 'last login date" with e-mail/name/id
Thanks!
0
votes
1
answer
59
views
misunderstand save action magefan blog
I have question on how do you guys save post_category relationship, when i debug save action, i just saw Post to be saved , how magic underneath the hood
https://github.com/magefan/module-blog
0
votes
0
answers
43
views
Certain Categories Missing Database Entries
I have noticed that certain categories in the database don't have entries. Once they are saved manually, the entries appear, but there are much too many of them to save them all manually.
This is ...
0
votes
1
answer
106
views
How to create REST API endpoints for core_config_data table?
I am working on an integration extension for Magento 2. I would like to create API endpoints for core_config_data table, because I would like to insert a html script to header of each specific store ...
0
votes
1
answer
179
views
Magento 2 - Add 2 New fields in bundle item option Selection
I'm trying to create a module which adds 2 fields in bundle option.
I've already managed to add 2 field:
However, it doesn't save the values in my database.
The columns are created, but they are not ...
0
votes
2
answers
411
views
TRUNCATE ui_bookmark; will delete all users?
I get the errors while customers add.
err: Something went wrong with processing the default view and we have restored the filter to its original state
solution: TRUNCATE ui_bookmark; ? is the right ...
0
votes
0
answers
45
views
My Magento SQL is taking 500% of the CPU
I am facing an issue with my SQL database which take 500% of the CPU.
I have taken a screenshot of the process list.
Error:
[2024-06-02T06:00:17.313192+00:00] main.ERROR: SQLSTATE[HY000] [2002] ...
0
votes
1
answer
112
views
How to understand any magento module work flow
I'm new in Magento. So I want to understand Magento from basic to advanced so I can work on projects as an individual without taking any help.
Please guide me on how to start learning and source ...
0
votes
2
answers
156
views
How to add bootstrap and angular in magento2.4.5
I'm a new Magento developer. I have a question, can I integrate bootstrap5 or tailwind css into my module without affecting the class of other modules and can I integrate angular into magento and how? ...
0
votes
2
answers
56
views
Issue with implementing unique_purchases column in main table using leftJoin in Grid ResourceModel
I have a SQL query that does what I need
SELECT ipi.*, COALESCE(unique_purchases, 0) AS unique_purchases FROM mst_inventory_planner_inventory AS ipi LEFT JOIN ( SELECT product_id, COUNT(DISTINCT ...
0
votes
0
answers
154
views
MySql Sleep Connections
We are facing huge MYSQL CPU usage. While investigating we found that there are MySQL sleep connections during the CRON run. Is there any way to reduce the CPU usage and the sleep connections. Please ...
0
votes
2
answers
267
views
magento installation error SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
I want to install magento and I run the command below,
php bin/magento setup:install --cleanup-database
--base-url=“http://**.***.**.*/var/www/html/magento/“
--db-host=“database-1.************.*****...
0
votes
1
answer
53
views
magento 2 new categroy product missing in category page
I am using magento 2.4.4.p1 upgrade from 2.3 to 2.4.4-p1 i have some products in my site in that few are disabled few are enabled after upgradation i am trying to enable one product it enable but not ...
0
votes
2
answers
52
views
Facing issue regarding data loss from database on magento235p1 when disable extension & reenabling it
There is data in my table as you can see in below image
when i disable the extension from command line & reenable it the data is getting remove from database as i attached the picture below
here ...
0
votes
2
answers
326
views
How to create data patch to insert data in dynamic blocks in Magento 2.4?
How to create data patch to insert data into the database for dynamic blocks?
0
votes
0
answers
91
views
magento2.3 mysql slow query
SET timestamp=1708087305;
UPDATE `theme` SET `parent_id` = NULL, `theme_path` = 'Magento/blank', `theme_title` = 'Magento Blank', `preview_image` = 'preview_image_5d490e5c15226.jpeg', `is_featured` = '...
0
votes
1
answer
176
views
Increase database size on Adobe Commerce Cloud
I have enough space in my instance's HD. However, the space allocated to my MySQL database shows 108% usage by using the command below.
magento-cloud db:size
How could I increase my MySQL HD's ...
0
votes
0
answers
95
views
Database Table Relationship and How To Save Data
I really need you guys’ help.
I just can't get my head around how magento saves relational data.
For instance, the catalogue-rule module has three tables,
"catalogrule",
"customer_group&...
0
votes
1
answer
143
views
Where to delete attribute values - Magento 2.4.6
We have an issue where we get data from a client. They are copying and pasting from websites so things are a mess atm.
So we have attributes with sku values in them. I did try and delete them manually ...
0
votes
1
answer
912
views
Magento 2.4.6 Localhost Install Windows 11
I am having issues installing Magento2 on my local machine. I have been following this tutorial but I run into the same issue where my localhost/magento2/pub/ page doesn't display content. I have been ...
0
votes
1
answer
416
views
Magento 2 Category field data scope issues
Good Afternoon,
I am looking at a data scoping issue around category content fields for Magento 2 (2.4.5-p2). I have a list of fields that we typically fill in (please see below for category content ...
0
votes
0
answers
170
views
Broken reference: the 'product.reviews' element cannot be added as child to 'product_tabs', because the latter doesn't exist
Broken reference: the 'product.reviews' element cannot be added as child to 'product_tabs', because the latter doesn't exist
0
votes
2
answers
172
views
Magento 2 :: Admin Custom Form values stored with double quotes issue
I have created a custom admin form using a UI component and added a multi-select shipping method field. I've successfully retrieved the selected values in an array and stored them as a string in my ...
0
votes
3
answers
131
views
What new features or enhancements can we expect in the upcoming Magento versions in 2024?
As we anticipate the upcoming Magento versions in 2024, several exciting features and enhancements are expected to shape the platform's evolution. While specific details may depend on official ...
0
votes
2
answers
142
views
i am fetching the data from database and display in magento admin grid, and the grid display blank
I have tried all of my thinking, I don't understand why the grid displays a blank
Controller
namespace StateDrives\RequestQuote\Controller\Adminhtml\Bulkquote;
use Magento\Backend\App\Action;
use ...
2
votes
0
answers
58
views
Sorting custom columns from module that extends another module containing all the data (collections, data providers, etc.)
I have two custom columns in UI grid (let's call them subscribed_customers" and "unique_purchases") created in particular listings that retrieve value from the database with logic. ...
1
vote
0
answers
423
views
Docker DDEV / DB error | php_network_getaddresses: getaddrinfo for mysql failed: Temporary failure in name resolution
I'm quite new to the Docker and DDEV material.
I've setup a local instance of our Magento repository, using Docker and DDEV.
Imported the database and changed the env.php using the following settings ...
1
vote
1
answer
42
views
How can i display table admin grid to module
ref.like this >>
from this
to this
1
vote
2
answers
72
views
Attempts to reindex catalog_product_price throws SQLSTATE[42000]: Syntax error or access violation: 1064 on Magento 2
Recently I've been unable to reindex Product Price (catalog_product_price) on Magento 2.4.6. When I run 'php bin/magento indexer:reindex catalog_product_price' from the CLI, I get the following output:...
0
votes
0
answers
56
views
Finding attribute option value between configurable product and its simple products by sql query
Using Magento 2.4
MaySql 8
I am investing now a lot of time to try finding the option_id (red marked) of the connected simple product to the configurable products.
I ended up in the following tables:
...