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
3
votes
2answers
240 views

Using Magento 2.3.2 with MySQL 8.0: Which problems could arise?

According to the DevDocs only MySQL 5.6 and 5.7 is supported. I have set up a shop now with MySQL 8.0 and it seems to work so far. However, it is not a fresh installation, instead I dumped the ...
0
votes
0answers
18 views

Catalog product index website is empty

From time to time the record of this table is deleted. Catalog product index website is empty Tech details: PHP 7.0.33 Magento v2.1.18 Apache/2.4.25 (Debian) 10.1.41-MariaDB-0+deb9u1 Debian 9.9 ...
0
votes
0answers
24 views

Where in the code does the database SELECT take place?

Where is the code in Magento that performs the SQL SELECT for a model and/or collection? I'm trying to trace through the code, but once Magento starts calling interceptors, object managers, and so on,...
1
vote
2answers
1k views

Upgrade to 1.9.2.2 - Base table or view already exists: 1050 Table 'mage_permission_variable' already exists

I am trying to upgrade to 1.9.2.2 from 1.9.2.1 through Magento Downloader. On the little screen at the bottom I am getting the error message below: Exception during cache and session cleaning: ...
0
votes
3answers
44 views

SQLSTATE[HY000] [2002] No such file or directory in magento 1.9

for no reason in getting this error on There has been an error processing your request SQLSTATE[HY000] [2002] No such file or directory
0
votes
0answers
21 views

Magento2 - How to create a backend module to insert data into a table?

I want a module to insert data into a custom table, created a custom table also created a menu in the admin menu now how can I add details to the table from the admin -> menu -> module name. ...
0
votes
0answers
10 views

How to create/change category and filters relations inside Magento database?

I want to change and remove filters in one category of Magento. My problem is that it's impossible to be done by admin interface because Magento returns an error. Once it is an urgent task, I would ...
2
votes
1answer
154 views

SQLSTATE[HY000] [2006] MySQL server has gone away - hosting company says to OPTIMIZE Magento :-(

Magento 1.9.1 Porto theme VPS server: RAM: 6 GB RAM Storage: 150 GB SSD Bandwidth: 6TB 8 cores Our Hosting company is Hostforweb.com They did this migration from a datacenter in Chicago to New York ...
0
votes
1answer
88 views

SQLSTATE[42S02]: Base table or view not found: 1146 Table '.core_resource' doesn't exist

All of a sudden I'm getting the following error. There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table '.core_resource' doesn't exist Trace: #...
0
votes
1answer
832 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....
6
votes
4answers
4k views

Magento 2.1 : CLI install command failed

Trying to reinstall Magento in cli. Run this command php -d memory_limit=-1 bin/magento setup:install \ --base-url=http://local/ \ --db-host=localhost --db-name=magento \ --db-user=root --db-...
8
votes
3answers
12k views

Find the attribute_id by attribute_code

I need to find the attribute_id values of the attributes image, small_image and thumbnail. I know them for my database - 85, 86 and 87, but I need to make my query dynamic, instead of with hard-coded ...
7
votes
2answers
14k views

Magento 2 How to select fields in query

I'm using below code $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $resource = $objectManager->get('Magento\Framework\App\ResourceConnection'); $connection = $resource->...
1
vote
0answers
23 views

Update product data in magento 2

I am trying to update product data programmatically through scripts. The data gets updated in database but not getting reflected in admin panel. I am using magento 2.3.2 Here is my code $product = $...
0
votes
1answer
19 views

Sql error thats been asked about before - Syntax error or access violation: 1118 Row size too large

Magento 2 When attempting to reindex - the usual error. The limitation is 65535. By others calculations it is number of varchar attributes * 255. However, in my case, the sql create statement for ...
2
votes
2answers
2k views

Do you enable query_cache for Magento?

All tutorials for optimizing Magento performance I read suggest that we should enable query cache in mysql -> my.cnf However, I read a lot of other articles and even the mysqltuner script also ...
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
0answers
9 views

Whenever I fill up the below form and clicking on Save Item Button Data should go to New Scan Orders/New Health Checkup orders Page

Girish/checkupforms is the model for New Health Checkup Orders Page Girish/forms is the model for New Scan orders Page public function saveAction() { if ($data = $this->getRequest()->...
0
votes
0answers
18 views

Error installing on Windows IIS

getting the followingg error when doing the setup on a windows server running IIS. Any ideas why this could be happening? [
0
votes
2answers
714 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 ...
1
vote
2answers
11k 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" ...
0
votes
2answers
88 views

Pulling credit memo from database using MySQL query

I'm trying to pull a credit memo from the directly from the database but i keep getting the below error ERROR: You have an error in your SQL syntax; check the manual that corresponds to your ...
0
votes
0answers
14 views

Magento 2 override database connection

I'd like to be able to override the database connection that M2 is using depending on what user is logged in (think multi tenant system). Can anybody point me that the database connection class / ...
0
votes
3answers
944 views

How to change my url from www.xxx.com/Magento to www.xxx.com

I am running Magento 2.2.7 and my current URL for my store is https://shop.xyz.ca/Magneto and I would like to change it to be https://shop.xyz.ca/ I am set up on Windows Server and using Xampp 3.2.2 ...
1
vote
0answers
659 views

Magento 2: Delete duplicate products programatically

I need to search Magento 2 DB for duplicate SKUs and remove duplicate products using a script, i found a very useful script here: Remove duplicated products from catalog. but it's not compatible with ...
1
vote
3answers
76 views

Anonymizing Magento 2.3 DB with fake data

I have tried to anonymize my Magento 2.3 DB with fake data and tried several tools. They are either too complicated or not working ... Anyone knows of a good tool or way to replace all data with ...
2
votes
2answers
2k views

Magento 2: How many products sold Query

For Product A have 100 qty., For Product B i have 200 qty. I would like to check how many products ordered for a particular product. Which table i need to look up & what will be the query to get ...
0
votes
0answers
44 views

Slow Query Magento 2.3.0

One of the query is taking 1,197.66ms as per the DB profiler. SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ...
1
vote
2answers
5k views

What is <update handle=“customer_account”/>?

What is the Handler? Can someone explain the below code? <update handle="customer_account"/> or same code like above for example : <update handle="default"/> and how it worked !?
0
votes
1answer
744 views

Display data from multiple database tables to frontend

How to get data from 2 database tables and show them in the custom frontend page? I have been looking for the tutorials, so far what i get is creating SQL Left Join in the Collection.php (even though ...
2
votes
1answer
2k views

Problematic Category ID? “No such entity with id = 0”

I've come across a problem I'm not able to handle by myself. I have recently started the process of moving my M1 store over to M2. All in all, a solution like Store Manager from eMagicone makes the ...
0
votes
1answer
16 views

How to get the product name by the sku in an inner join

I am trying to do a join from inventory_source_item (sku column) to get a list of product names. i currently have SELECT * FROM `inventory_source_item` order by source_item_id desc limit 61 What ...
0
votes
0answers
17 views

Magento 1.9.4.3 - Print in foreach the columns titles of a table of database

I recreated this question in this section because this is an operation that I am trying to do from the Magento database. So, in my database table "sales_flat_order" I have created 5 columns which are ...
0
votes
1answer
13 views

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel, how can i implement, <form action="">, what to put in ...
1
vote
2answers
1k views

How to import products from another database into magento2's database

I have an ERP system with a database that holds more or less 400,000 items. I need the 400,000 items to be migrated to my Magento 2.1.3 database. Is it possible to directly import items from my ERP ...
0
votes
0answers
14 views

Access Magento 2 Database using Getpostman

I am trying to find the resource in order to download Magento2 database using getpostman, I have setup env of GETPOSTMAN Not sure if It's possible somehow to generate Magento2 Database from some ...
1
vote
2answers
1k views

Custom Attribute is not saving data in database

I'm trying to add custom text box named cashback in Magento 2 product add/edit page. I added the text box programmatically. But my below code doesn't add column in the table also not saving the value. ...
18
votes
3answers
41k views

Base Url Change Magento2.1

I have changed Base url in Magento 2.1, but it does not works. While installing I have set base url to www.domain1.net. I need to change it to www.domain2.net. What I tried: Update baseurl in ...
0
votes
4answers
2k views

Direct sql query in magento not working

I am facing strange problem, when I use direct SQL query method in Magento controller its not working $resource = Mage::getSingleton('core/resource'); $connection = $resource->...
2
votes
2answers
802 views

Flush DDL Cache

I created an update script to create some new fields in the database for my custom model. When I am trying to save the model the new fields are not being saved. I thing Magento caches the DDL ...
0
votes
3answers
40 views

How to use one database for each store or website?

Let's suppose that I will create an e-commerce for a restaurant chain that has several restaurants and in each restaurant the menu is a little different. The user will enter the website and input its ...
0
votes
0answers
22 views

Data scaling in magento 2 like integration nosql to load product data from nosql

How we can integrate nosql with magento to load pages data faster than mysql
2
votes
1answer
1k views

Performance issue - slow query in Magento 2

When I check SHOW PROCESSLIST; in mysql I got below query. It heavily uses CPU (more than 100%). We have a separate server for mysql(64GB RAM). INSERT INTO `search_tmp_598075de5c7e67_73335919` SELECT ...
0
votes
0answers
16 views

Magento 2: How to allow updating a null value for a column having foreign key constraint?

I have 2 tables A and B A id name B id name a_id FK references A(id) I used the Magento's upgrade script to add both tables, everything was created correctly, however when i tried to setting a_id ...
1
vote
1answer
1k views

Magento import tables from old database show error (errno: 150 “Foreign key constraint is incorrectly formed”)

i want to import old customer data to new magento store i have imported all customer's table instead of customer_entity, when i import this table i am getting this error 1005 - Can't create table ...
1
vote
2answers
34 views

QLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.vgroup_testimonial' doesn't exist, query was: DESCRIBE `vgroup_testimonial`

I have installed an extension for testimonial by V Group Inc. after the installation when i tried to add testimonies, the extension was giving me this error SQLSTATE[42S02]: Base table or view not ...
1
vote
1answer
141 views

Magento 2: Multiple Product Type Not Sorting Due To Amasty Extension

I'm facing a problem due to Amasty Extension. I have a category which has 1 simple product and some configurable products, but when I try to sort them, simple product always comes first although ...
1
vote
2answers
23 views

2.3.3: Moving to an updated version of a website

I need to move from my old version of my site to my new one. I have imported all the orders although I did this manually as the products structures completely changed. I would like to know a reliable ...
0
votes
1answer
27 views

How to assign guest orders to registered customers by email via SQL?

I'm using this SQL below to manually assign guest orders to registered users. UPDATE sales_order SET customer_id = {YOUR CUSTOMER ID}, customer_is_guest = 0 where entity_id = {YOUR ORDER ID}; UPDATE ...
0
votes
0answers
10 views

how can i move the product tab section to the below of the product gallery with 50% width in magento 2

how can i move the product tab section to the left of the gallery section with the width 50% which is now having 100% width in magento 2.3.3 please help

1 2 3
4
5
67