Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
709 views

Submit form values using controller and model in magento frontend module

I am building an module and need to process a form but am having troubles getting the variables to POST and am just redirected to the same page. The form looks like this : <form id="...
0
votes
0answers
11 views

SQLSTATE[42000]: Syntax error or access violation: 3057 Incorrect user-level lock name

When I run php indexer.php --reindexall command I get following error. PDOException: SQLSTATE[42000]: Syntax error or access violation: 3057 Incorrect user-level lock name 'magento_prod....
1
vote
0answers
57 views

Magento 2.1.5: Mysql Error when browse Category page which have no products

When i browse to one category page that do not have any product i receive a report error. The report says: a:4:{i:0;s:2291:"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an ...
0
votes
1answer
43 views

Magento Open Source 2.3 / 2.2 - How many orders / inventary and SKU it can handle?

I'm about to start a project, But my concerned is on the data, the magento 2.2/2.3 can handle. The traffic figures are in 1 Million to 5 million and we are not interested in Enterprise model as of ...
2
votes
1answer
820 views

How to check if value exists in catalog_category_product table Magento

How can I check if the value exists in catalog_category_product table Magento ?
0
votes
1answer
772 views

process collection after load collection

$categoryid = 43; $layer = Mage::getModel("catalog/layer"); $category = Mage::getModel("catalog/category")->load($categoryid); $layer->setCurrentCategory($category); $attributes = $layer ...
1
vote
1answer
19 views

Convert install/upgrade schema scripts to db_schema.xml files on Magento 2.3.1?

I'm following the guide from Magento devdoc about the Declarative Schema: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.html I created a new module ...
1
vote
0answers
25 views

How to add custom field in checkout page and save them in db and backend in magento2.2.5?

I want to add a custom field in the checkout "Birthday" and "Anniversary" and save them in table quote, sales_order, and sales_order_address and to save them in Backend in sales view order below the ...
0
votes
0answers
17 views

Error en multistore “SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name”

When using Magento checkout show Error en multistore(only spanish) "SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()"
0
votes
0answers
20 views

How to keep products synchronized in two shops

How can I transfer all products from one shop to another after clicking a button? We have a shop which is a copy of our real shop. We need to keep the products, prices, etc. synchronized in both ...
0
votes
1answer
784 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 ...
1
vote
0answers
21 views

row_id vs entity_id in magento 2.3 EE

in magneto 2.3 EE , entity_id is missing in EAV tables , instead row_id is available please explain the difference between row_id and entity_id and the removal of enity_id in EAV tables
0
votes
2answers
828 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
0answers
19 views

Magento2 Database Lock wait timeout exceeded

In my magento admin panel i am getting below error. SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE flag SET state = ?, last_update = '...
0
votes
1answer
21 views

How to Get Recently viewed Products in Magento 2

i want to get all data from magento core table table name is report_viewed_product_index i searched on stakeexchange and found some solution but havn't for success class Wbtab extends \Magento\...
0
votes
0answers
20 views

magecatalogrule database tables automatic copies

I have a Magento/2.2 (Community) which is creating every about 30 minutes a copy of magecatalogrule_* database tables. In the last hour: 09:36 magecatalogrule_group_websitebda17fbb 09:36 ...
0
votes
0answers
53 views

Can we delete stores and orders before delta migration

We have a multistore site for which data is migrated from Magento 1 to Magento 2. We need to clean the database for some stores which are not active now. As the stores that we want to delete are not ...
0
votes
0answers
12 views

Flat equivalent of EAV SQL query [closed]

what is the flat equivalent of EAV sql query to fetch all the products from EAV tables same as flat
1
vote
2answers
2k views

Export a csv with product name and thumbnail image?

I know it's possible to export csv's from Magento. Is there a way to get a small image to export in a column and not just the image path or url. Also, I know _media_image is a field, is that an ...
1
vote
2answers
792 views

Magento1 SQL select all Attribute Option values like in Admin Backend

I want to get all values of all M1 Attribute Option values like in Magento backend. I have this code SELECT eav_attribute_option_value.option_id, eav_attribute_option_value.`value`, ...
2
votes
3answers
1k views

Magento upgrade from 2.2.3 -> 2.3 error in module-configurable-product

Upgrading M2 from 2.2.3 to 2.3 gives me the following error during the magento setup:upgrade process: PHP Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, boolean given ...
3
votes
0answers
35 views

Setting up AWS RDS Read Replica on Magento

My Magento DB hosted on AWS MySQL RDS is running at 100% utilization. I have created a Read Replica so that read query can be served by it. But do not know how to configure it. Does anyone have any ...
2
votes
1answer
30 views

How to join three custom table in magento 2

I want join from Table 1 -> Table 2 has id = custom_id Then join from Table 2 -> Table 3 has Table2.id = Table3.id And will get table1.id if eligible My Table Ex : Table 1 -> Table 2 Table1.id =...
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 ...
2
votes
3answers
3k views

Magento2 - Use placeholder {{base_url}} in multistore

In magento1 you can set the base url's in a multistore like this: {{base_url}}en/, {{base_url}}nl/, etc. Trying that in Magento 2 will result in the following Error: Invalid Base URL. Value must ...
0
votes
1answer
34 views

phpcs possible raw SQL statement

In my code I've got a $connection->query("TRUNCATE TABLE $tableName"); Works great. However using the official https://github.com/magento/magento-coding-standard ruleset it showed the following ...
1
vote
0answers
40 views

Magento 2.x Migration Final Sync 'Delta' Stage when not Migrating from Live Database

In the middle of a Magento 1.6.2 to Magento 2.x migration. I made a duplicate of the 1.6 store/database and migrated the data from that database to the new one. That was probably about 2 weeks ago ...
9
votes
4answers
11k views

Magento2 InstallSchema.php does not create the table specified

I have an InstallSchema.php that just does not create the necessary table in the database. The code of the schema is as fallows : <?php namespace MyVendor\Helpdesk\Setup; use Magento\Framework\...
1
vote
3answers
931 views

How Exporting PhpMyAdmin data in Zipped or gzipped

I am a learner with Magento i have created dummy website on my localhost Xmapp server. Now i want to move it to live server but when i am exporting Mysql data base it is directly downloaded in sql and ...
0
votes
1answer
756 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, ...
0
votes
0answers
15 views

Magento1 frontpage keeps loading, but admin panel is working fine

Magento version 1.9.1.0 is installed on the server. When I open the admin panel, site is working fine. But when I open the home page or any category page site keeps loading. It does not throw any ...
0
votes
0answers
14 views

Magento 1.9 running slow on frontend on localhost and production servers

I'm trying to speed up Magento 1.9.0.1. It's taking something like a minute or so on localhost MAMP 5, and page speeds on production are loading over 10 seconds. I've tried full page cache extensions,...
0
votes
2answers
965 views

magento 2 errors : General error: 1205 Lock wait timeout exceeded; try restarting transaction

I am getting below error every second or third day. Exception #0 (Magento\Framework\DB\Adapter\LockWaitException): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try ...
1
vote
1answer
795 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
23 views

Magneto Shipping country ID is shown as NULL in the reports

I'm using PostgreSQL in my data ware house for reporting purposes, and for a certain report I have to show the sum of revenue for each month grouped by country. When i pulled the report the ...
0
votes
0answers
22 views

Can not update the database during magento 2 module submission in marketplace

I am getting the following error while upload module package in Magento 2 marketplace. Cannot update the database How to overcome this error? Note: I did validate the package successfully using ...
2
votes
3answers
94 views

How can I remove not existing images in magento 2

How can I remove not existing images from magento. In the database have images but file is not exist. I want deleted this images from database.
0
votes
0answers
22 views

How to display numbers of row in table to section in configuration system

I want to count the rows of table and display it to field in section system, can someone help me how to resolve this. Thanks!
0
votes
1answer
1k views

How to undo bundling, merging, and minifying the JavaScript and CSS in Magento 2.1.x

I attempted to speed up my website by bundling, merging, and minifying the JavaScript and CSS through the Admin. Stores> Settings> Configuration> Advanced> and then Developer, and changed ...
1
vote
1answer
822 views

Magento Reindex Prices error

I am not really sure what got changed but for some reason now i cant reindex my product prices... this is the error that my log is throwing me, any help would be much appreciated. > 2015-09-08T14:...
0
votes
0answers
23 views

order sale vs purchase order in Magento (not getting the difference)

I dont fully understand what is the difference between Sale Order and Purchase Order in MAGENTO. In my system i have 4 tables that are related to the Sale Order and 4 tables that are related to the ...
0
votes
0answers
9 views

Magento2.2.5 I am getting Integrity constraint error while placing order?

{"0":"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mm_29.order_custom_engravings, CONSTRAINT ...
0
votes
1answer
12 views
0
votes
0answers
26 views

M2 | How can we use same code base among all team members via Git?

We are a team of developers and wanted to share same codebase (DB, Configuration, Magento instance). We are using Magento 2 Image for Docker on MacOS. Individually we are working fine with docker. ...
0
votes
1answer
322 views

Very strange mysql wait after moving to different server

I moved my webshop to a different dedicated server, same specs as my old one. Now I am testing it but there is a very strange wait before loading the page. The page load is more then 30 seconds, on ...
1
vote
1answer
960 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
772 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....
0
votes
2answers
485 views

How to manually import/migrate orders & customers from Magento1 to Magento 2 database tables?

What is the best way to manually move the orders and customers to Magento 2.2.6 from Magento 1.8.1 without any third part extensions? there are around 100 records only. I was able to migrated all ...
1
vote
3answers
54 views

In Magento2, how to get the product description from Sales order table

I want to display the order id, item description, sku and price of products from the sales order and sales order item tables. For some reason, the description columns in my sales order item table is ...
0
votes
1answer
14 views

Product Filter By Date Attributes Magento 1.9

So i have created a attributes is future_date Now i want to filter product based on this attribute. I want to filter product whatever match with this date. For an example we setup a date 5th June and ...