Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 answer
8 views

I am facing these error from the database. I am not clear about which Parameter value needs to be update from the parameter group

We are using Magento Community version 2.4.2 it is hosted on AWS having EC2/RDS. Currently we are facing these errors which is eventually exhausting the RDS sessions. Need assistance regarding which ...
Abdul Rafay's user avatar
0 votes
2 answers
25 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? ...
Abu Shino's user avatar
0 votes
0 answers
10 views

Magento CE 2.3.1 Warning: PDOStatement::execute(): MySQL server has gone away in Zend/Db/Statement/Pdo.php on line 228

I am setting up existing magento project with PHP 7.1 and Mysql 8.0. when I run setup:upgrade its returning error: Module 'Ves_Megamenu': Installing schema... Upgrading schema... Warning: PDOStatement:...
Sagar Parikh's user avatar
0 votes
0 answers
19 views

magento 2.4 custom query bind values

on my magento I need to run a custom query to fix some data. I'm trying to write my queries using Magento standard way as much as possible. The code is pretty simple: first I check if there are any ...
Lou Nik's user avatar
  • 453
0 votes
2 answers
30 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 ...
Dramorian's user avatar
0 votes
0 answers
63 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 ...
Jasvir Singh's user avatar
0 votes
2 answers
45 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.************.*****...
Meow's user avatar
  • 1
0 votes
0 answers
18 views

Get product attributes values for out of stock products in elastic search without changing 'display out of stock' configuration setting to yes

So I want to get product's attribute value to work on if it is set to yes but product is out of stock so it is not shown on the frontend. One solution is to change 'display out of stock' configuration ...
Raj Pawan Shukla's user avatar
0 votes
1 answer
30 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 ...
pavan kumarexinent's user avatar
0 votes
2 answers
33 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 ...
syed zaviar hasan's user avatar
0 votes
2 answers
102 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?
Vinod Kumar's user avatar
  • 2,065
0 votes
0 answers
50 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` = '...
Magecomp Product Team's user avatar
0 votes
1 answer
35 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 ...
Rafael Corrêa Gomes's user avatar
0 votes
0 answers
9 views

Authenticate and Capture not working. How do I go about debugging this?

When I set payment methods to 'Authorize and Capture' (tried authorize.net, paypal, and others) I get a server failure notice on the website. The error and exception logs show an integrity constraint ...
Jon's user avatar
  • 295
0 votes
0 answers
42 views

Magento2 how to get two tables data in my custom grid.?

I want to get data as name from salesrule table code from salesrule_coupontable. Here I attached the salesrule and salesrule_coupon table in which I want to get code column data. In the salesrule ...
Ekta's user avatar
  • 101
0 votes
0 answers
33 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&...
Joseph Haan's user avatar
0 votes
1 answer
67 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 ...
Jan-petter Havna's user avatar
0 votes
0 answers
20 views

Database connectivity issue in Mule4.2.0

We are facing a MySQL database connectivity issue in Mulesoft, the mule has two types of database transactions. one is to the mule’s server( Self ) database and the other one is to the remote server ...
R J's user avatar
  • 5
0 votes
0 answers
30 views

Deadlock on table inventory_pickup_location_quote_address

Magento 2.4.5-p5 with MariaDB. I regularily get this error: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: DELETE FROM `...
bfontaine's user avatar
  • 120
0 votes
1 answer
240 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 ...
Kage Dev's user avatar
0 votes
1 answer
38 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 ...
Baber's user avatar
  • 192
0 votes
0 answers
43 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
Alan Biju's user avatar
0 votes
2 answers
80 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 ...
IntraPersonalLearner's user avatar
1 vote
2 answers
78 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 ...
Roshan Choudhary's user avatar
0 votes
2 answers
55 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 ...
abbas fakhruddin's user avatar
2 votes
0 answers
42 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. ...
Dramorian's user avatar
1 vote
0 answers
122 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 ...
MaxiKloas's user avatar
1 vote
1 answer
26 views

How can i display table admin grid to module

ref.like this >> from this to this
Bu By's user avatar
  • 23
1 vote
2 answers
31 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:...
mcpacific's user avatar
0 votes
0 answers
41 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: ...
Samuel Demir's user avatar
0 votes
0 answers
35 views

How to add custom checkout fileds fetched from DB?

How can I make a new, custom, checkout fields fetched from DB? I have created a new table where I keep fields names, also I created a Model, Resources, ResourceModel (admin can modify or add new one ...
miguelsantos69's user avatar
1 vote
0 answers
21 views

Error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aee9c6e2_iy62GL.catalog_product_index_price' doesn't exist,

I have hosted my website in Nexuss and my website crashed due to a server issue recently. They have replaced my website with the backup and brought back the website. Magento version 2.2.2 But my ...
Mujahidh's user avatar
  • 2,793
1 vote
1 answer
49 views

Update index value using patch in magento 2.4

Currenty, order_id is set as unique and i want to set as the index. Please help me on this. <?php declare(strict_types=1); namespace Abc\Xyz\Setup\Patch; use Magento\Framework\DB\Ddl\Table; use ...
Kushal Dani's user avatar
  • 2,114
0 votes
1 answer
119 views

Element 'item': This element is not expected. Expected is ( argument ) when in developer mode

I am getting this error: Element 'item': This element is not expected. Expected is ( argument ) when run command like: php bin/magento cache:flush. I try to get back production mode but still get the ...
it's me's user avatar
0 votes
1 answer
58 views

How I can search in database for a category given in url?

Upon development I want to reindex only specific categories because reindexing takes too long. Therefore I am whipping a quick commang where I need to provide a category url and from that triggerring ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
115 views

Error while saving Category in Magento 2.4.6-p1

When I try to save a category I am getting cloudflare timeout error and the category is not getting saved. When I checked the exception log I found this error : SQLSTATE[HY000]: General error: 1205 ...
Akhilesh's user avatar
  • 209
0 votes
1 answer
636 views

Mysql error MySQL doesn't yet support drop existing primary key without adding a new primary key

need help regarding the issue, All of the sudden our production environment we are getting issue during upgrade command SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL ...
Waqar Ali's user avatar
  • 2,329
0 votes
1 answer
66 views

How I can find what values must have `MAGE_RUN_CODE` and `MAGE_RUN_TYPE` for each store/website url from db?

I am transfering a magento website and I have lost nginx settings. But I have full access in the database. In my case I want to find out upon each store url what values must have the MAGE_RUN_CODE and ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
204 views

Import Order from Magento 1 to Magento 2

I need to import orders from m1 to m2 and available orders in m1 are a minimum of 2 lakh on the m1 website. So I thought we were going with SQL and importing orders using SQL. if anyone has created an ...
Viral Patel's user avatar
  • 1,001
0 votes
1 answer
198 views

List of log tables to safely truncate in Magento 2?

For Magento 1, here is a list of log/cache tables which can be safely truncated. Is there a similar list of tables for Magento 2, which can be truncated/deleted without deleting base data? Please note ...
amitshree's user avatar
  • 7,036
0 votes
1 answer
65 views

Migration SQL ERROR 1062 (23000) Duplicate entry 'NULL'

I'm trying to move a live site to a dev server. Export SQL has been done with phpmyadmin. When importing via CLI; mysql -u "user" -p "name_new_database" < bupsqlfile.sql I get ...
bcnmm's user avatar
  • 21
0 votes
0 answers
50 views

How I can seed a user with a quote?

I am developing a functionality where I need a user with quoted. But for development speed I want to create via command-line a single user with 2 quotes for a specific website. Is there a tool that ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
82 views

How I can seed products into database directly?

Sometimes I have magento installations where my coleagues do edit files in ./vendor folder. Therefore, using magento's seeder will require extra dependencies and may break the ./vendor folder. As a ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
101 views

Magento 2 DB Locks

I'm running Magento 2 and since a recent upgrade my DB seems to be having DB locks quite a lot, yesterday it happened at least 3 times, my developers are unable to find the source of the problem and ...
Sparetoolparts's user avatar
0 votes
1 answer
67 views

Magento 2.4.3 - The store that was requested wasn't found. Verify the store and try again

when customers are trying to create a profile on our client's website they get the following error message: "The store that was requested wasn't found. Verify the store and try again." After ...
Jan-petter Havna's user avatar
0 votes
0 answers
106 views

Unable to run Magento site on nginx

Using Debian 11, I installed PHP 8.1, PHP-FPM 8.1, Mysql 8, NGINX, Elasticsearch, Magento2 via composer. Now I am able to see the localhost welcome Nginx page and I cant navigate to Magento site. I ...
Leo's user avatar
  • 1
0 votes
1 answer
107 views

Products Using Placeholder Image in Category View

A script was run to clear unused product images to free up space on the server, but instead of clearing unused images, it accidentally cleared a portion of images currently in use by products. The ...
Bluestocking's user avatar
0 votes
2 answers
282 views

How I can create a Model and Save it using Magento2?

I made a seeder custom command in order to populate multiple models for my developemtn easyness: <?php namespace MageGuide\FirstModule\Console\Command; use MageGuide\FirstModule\Model\BlogPost; ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
50 views

How I can reference product SKU as foreign key reference?

In my db_schema.xml I made a table with a pivot one: <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...
Dimitrios Desyllas's user avatar
0 votes
1 answer
236 views

Magento 2.4.6 Opimize database tables

I'm using Magento 2.4.6, I want optimize the database, Some tables have large entries. report_viewed_product_aggregated_daily report_viewed_product_aggregated_monthly ...
MP Raj's user avatar
  • 524

1
2 3 4 5
66