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.

1
vote
1answer
19 views

Magento 1.9: Massive set customer confirmation attribute

I imported over 3000 customers in magento, I need to set them all as confirmed. How can I do?
3
votes
1answer
29 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:...
1
vote
1answer
17 views

Base table or view not exist

I want to import product or create them via the BO. Before, it's was OK, but, I don't know why, suddently, it's impossible to me to create product. Each time, I got this error : SQLSTATE[42S02]: ...
2
votes
0answers
15 views

Magento 2 master slave connection for DB

I am planning to enable Master and slave connection on my Magento site. Magento team suggest me to check my 3rd party and custom modules support this master/slave config or not. I am not sure how can ...
2
votes
1answer
19 views

Saving Custom Option Field to Database Not Working

I have the below code in my custom module, at App/Code/Ibex/Options/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php and added a "weight" column to catalog_product_option_type_value in the ...
1
vote
3answers
34 views

Magento2 which table to store data like configurable product

Magento2 which table to store data like configurable product and associated related simple product and also in Magento1 which table to store data like configurable product and associated related ...
2
votes
1answer
36 views

SQL Error when I try to reindex Magento 2

I have an issue in Magento 2.2.7 where my site has the message "One or more indexers are invalid." and looking at the indexers I see the following: However when I try to run php bin/magento indexer:...
1
vote
1answer
24 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,...
0
votes
1answer
28 views

Magento 1.9.2.1 error SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'

I imported database backup through terminal . in terminal it gave error ERROR 1062 (23000) at line 1016624: Duplicate entry '0' for key 'PRIMARY' then I used the below commands to resolve this -...
0
votes
1answer
26 views

Clearing database logs in Magento 2

We've recently migrated from Magento 1 to Magento 2 and it seems that there is a large amount of information in our database files. We'd like to try to mitigate this by clearing the log files but ...
0
votes
0answers
26 views

Item (Mage_Catalog_Model_Product) with the same id “35” already exist

In admin, I can create multiple categories to shown in homepage. This all categories are called on homepage via widget. This is working as expected if all categories have unique products. Suppose One ...
2
votes
1answer
29 views

How to add select state dropdown field in custom phtml form and save in database(frontend) in magento2.2.5?

I have added a select state dropdown field in my custom phtml file. But not able to save that value in database in Magento2.2.5? /var/www/html/magento2/app/code/Amy/Contactform/Block <?php ...
1
vote
0answers
19 views

Magento2: Mysql Database Slowquery log generating and Magento2 Website going down

Below error showing when Website going down Any one know solution? When I restart server then website run again. But I want to know why server log showing below error. INSERT INTO ...
0
votes
1answer
28 views

Magento 2: 2 databases, only one with table_prefix

I have defined an additional custom database connection in etc/env.php: 'db' => [ 'table_prefix' => 'abc_', 'connection' => [ 'default' => [ 'host' => '...
1
vote
0answers
23 views

Requested store not found

I am having an issue with stores, magento is trying to find a store by id '3', it doesn't exist, due to which most of the functionality is not working. Website was migrated from 1.9.2.4 to 2.2.7, I ...
1
vote
0answers
20 views

Logging Magento 1.9 database queries. What doe the

With the below code, what does "#0000000005dc945b000055af41b2fb74#" from lines 5 and 6 represent? Is this related to the PID or session hash? Any idea. This code is taken from database queries after ...
0
votes
0answers
13 views

Magento2: Seeking advise before I make a mistake when migrating my data to new magento installation

I am looking to migrate data from my current magento2 installation to a new installation with a brand new theme on another server. I have taken a dump of the mysql database, created a new database and ...
1
vote
1answer
26 views

Magento 2 - CLI Installation - MySQL Access Denied despite correct authentication

I've been following the documentation for Magento 2.3 and am now stuck while trying to set it up on the command line. I'm executing the following: bin/magento setup:install --base-url=http://...
1
vote
1answer
24 views

Magento 1.9 - Customer placed the order successfully but its not in the Magento Admin Panel

I am facing a very serious issue with Magento 1.9 website. This has happened a couple of times. Customer places the order, they even get an email confirming the order but the order does not show in ...
0
votes
0answers
36 views

Getting Errors after MySQL database import

I took a MySQL dump of my live website and imported the data to a fresh database for my development site. However, only the homepage is working, other links bring an error There has been an error ...
1
vote
1answer
23 views

Magento 2: In which database table are the payment methods stored?

I'm working on a custom module that uses a database table that have the foreign key of both the payment methods and customer groups. I don't know which database table stores all the payment methods. ...
1
vote
1answer
77 views

Magento 2 : Foreign key constraint is incorrectly formed, ALTER TABLE customer_group

After upgrade from magento 2.1.7 to 2.2.3 and am stuck. I have tried everything. In Pdo.php line 235: SQLSTATE[HY000]: General error: 1025 Error on rename of './zwwnzwzjhe/#sql-1bd1_25f9' to ...
1
vote
1answer
24 views

PayPal Express Firstname and Lastname Empty: how to SET these fields using a query

We were having this issue PayPal Express FIRSTNAME and LASTNAME instead of SHIPTONAME Now we have many accounts where there is no firstname and secondlastname, however shipping data is correctly ...
5
votes
1answer
107 views

Magento 2.3 Error on Delete All Test Data from Database

We are in the process of migrating to Magento 2.3, but need to remove all test data from the database and reset all increment ID's back to 1. Having some troubles removing all order information: SET ...
0
votes
1answer
17 views

Is it safe to delete diretly from the newsletter_subscriber's table?

I recently turned on email address confirmation for visitors signing up for the newsletter. I'd now like to delete all the newsletter subscriptions made prior to this. Whilst the database table ...
1
vote
0answers
20 views

magento 1.9 CE error when duplicating a product

When I use the method to duplicate an object sometimes I get this error message, the product is created: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-0-0-1-4-24884-0' for ...
1
vote
0answers
16 views

Migrating data to a new and clean installation in version 2.x

I would like to migrate all my Magento data to a new installation on version 2.3. We are currently on version 2.2.0 which has the Webkul Marketplace Extension. Basically, all I want to extract from ...
0
votes
0answers
11 views

fixed decimal qty on certain sku

I'm looking for a way out for some products that they only have certain qty behavior like 0.25kg/0.5kg/0.75kg, is there any method that could help to show this behavior on frontend or if I can check ...
0
votes
0answers
18 views

Magento2 Getting issue on Reindex SQLSTATE[42000]: Syntax error or access violation: 1070

Getting issue on Reindex, I was about to create a new customer attribute, How can i fix this, I also need is_used_in_grid = true Customer Grid indexer process unknown error: SQLSTATE[42000]: Syntax ...
0
votes
2answers
37 views

Magento 2.2.7 sequence_order_1 after removing database prefix error creating orders

I'm using Magento 2.2.7, I had a prefix on my tables, e.g: ab_, I've removed the prefix on all my database tables via phpmyadmin, and I'm unable to now create orders due to the following error: [2019-...
1
vote
3answers
49 views

Magento 2 PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections

When I run a script for upload products more than 5000. after 152 products upload showing below error. How can I upload thousand of products from csv without error? Error: PHP Fatal error: ...
0
votes
0answers
18 views

How to know if records in database table updated

I need to update stock product quantity in database from external database, is there any way to know if stock in external product table has been changed.
2
votes
0answers
34 views

Redis does not improving performance

I'm trying to find the best setup for one really slow site. For education purpose. I set with AWS CloudFront like full page cache, not only static files. Also Varnish and Redis, and performance are ...
0
votes
0answers
23 views

Magento 2 - read and write connection for custom query

I am using Magento 2.2.5 EE. I need to write some custom queries Select and Insert I know how to write custom query, its simple: Create new connection: $objectManager = \Magento\Framework\App\...
2
votes
1answer
27 views

Magento2 : Change the number of an existing invoice

We moved from a different shop sytem to Magento 2.3 and customers already made some orders (Yay!). Due to some regulations all invoice numbers must be continuous. How can I change the number of an ...
4
votes
0answers
39 views

Importing from Custom E-Commerce Platform to Magento 2 (MySQL to M2)

I need to import Products, Customers and Order History from a custom e-commerce platform into a new Magento 2 implementation. Ideally the extension or cloud service would allow us to connect directly ...
4
votes
2answers
196 views

Database possibly compromised

I want to know if strangers have accessed the database. If so, I want to find out how they got access to the database. I found a strange trigger in the database (screenshot below).
3
votes
2answers
23 views

How to add new customer in magento 2 admin

I'm trying to add a new customer in magento admin, after creating the credentials I can't seem to log in as per there is no password field upon creating. Can anybody tell me how to add a new customer ...
0
votes
0answers
32 views

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away Error after migration; details of log file in text

Magento 1.9.1 We just got migrated to a different node because we had performance problems on the old node (within the same hosting company) and ever since then, none of our Magento stores even load. ...
1
vote
1answer
29 views

How to save custom frontend form to database in Magento2.2.5?

How to save custom frontend form to database in Magento2.2.5? Any help would be appreciated
0
votes
1answer
26 views

What is quote_preview table used for in Magento 2

I was checking the quote tables in Database and stumbled upon quote_preview table, anyone have idea what it is used for ?
5
votes
1answer
46 views

Catalog indexing take 3 to 4 days

I have facing problem about manual indexing from cli and my command php indexer.php reindexall will take 3 to 4 day to compelete the indexing. Here is some states of current catalog. Number of ...
0
votes
2answers
23 views

How can I use mysql functions when I use collection filters?

How can I use something like this one NOW() - INTERVAL 10 DAY in collection filter? ->addFieldToFilter('period', ['gteq' => 'NOW() - INTERVAL 1 DAY']) Before running the query, the value in ...
0
votes
1answer
20 views

Where can I find the cache properties in the Magento 2 database?

I've had some troubles with the caches, they are enabling via CLI using production mode but it's not showing on my admin panel as enabled, it just works using developer mode. I wondering check the ...
1
vote
1answer
44 views

Error Add Foreign Key Using Install Schema Magento 2

<?php namespace Magneto\BookFreeLayout\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\...
1
vote
1answer
32 views

What is the additional_data column used for in sales_order_item table?

I have noticed that there is a column additional_data in the table sales_order_item. What is the purpose of this column? Can I put some data into it? If I can do that, how can I assure my data will ...
2
votes
1answer
56 views

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID'

I am using this data-migration-tool, When i migrate from magento 1.9.3.2 to magento 2.3,getting below error, SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key '...
2
votes
1answer
36 views

What is different between subtotal and subtotal_invoiced

Sometimes I have seen in order in the sales_flat_orders table that have a subtotal but have no subtotal_invoiced. What is different between them? Here is a sample row extracted from sales_flat_orders ...
2
votes
1answer
40 views

Error Enter Valid date at cart price rule and save it db, after adding time in date picker in Magento 2.2.6

<?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> ...
1
vote
1answer
49 views

Can't save customers after migration Magento 2

After I migrated from Magento 1.9.3.8 to 2.2.5 although I can create new customers I can't edit and save the migrated ones. In admin I get errors that First Name, Last Name and other attributes are ...