Stack Exchange Network

Stack Exchange network consists of 174 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 ...

0
votes
0answers
12 views

Restoring database triggers

There's been a known issue with Magento's backup/rollback process for a while, which was marked as resolved in 2.2.x & 2.3.x where taking a backup removed the mysql triggers: (see: https://github....
0
votes
0answers
27 views

Error in log in Magento 2.2.6

Receiving these errors which are causing me problems with store. exception.log: [2018-12-10 06:45:03] main.CRITICAL: Invalid method Magento\Eav\Model\Entity\Attribute::isAllowedForRuleCondition {"...
1
vote
1answer
8 views

Are the file paths inside a db table?

Does someone know if some file paths are stored in the database? I created 2 environments and exported one database to another but on the second environment I get the following error: exception(s): ...
0
votes
0answers
13 views

Magento2: How to add customer via SQL query?

i want to add a customer in database using insert query. Different table insert query for customers , which create a new customer after will login successfully
0
votes
0answers
4 views

Magento showing default images after moving to a new server

I have a magento store with version 1.9 hosted on http://bandsawblades.co.uk which I move to 1and1 server on a subdomain called http://test.bandsawbladedirect.co.uk The images are not showing on ...
0
votes
0answers
21 views

Can't upgrade database from 2.2.7 to 2.3. Cannot process definition to array for type enum

Magento 2.2.7 to 2.3 Started at 2.2.3 and upgraded incrementally via command line. Php 7.2 is enabled. Did not enable until ready to upgrade to 2.3 b/c 7.1 support ended on M2.3 SQL Version: 10.1....
0
votes
0answers
14 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 ...
0
votes
2answers
15 views

Problem Sessions Database - Magento 2

today I saw my Magento database and in a few months it went from a weight of 300MB to 2GB. I saw which of the tables was heavier and I saw that there is a 2GB SESSION table. Why do the sessions are ...
0
votes
0answers
10 views

Magento 2: How to truncate customers and order tables - Error#1701 cannot truncate a table referenced in a foreign key contstraint

I tried to follow this solution Magento 2: How to truncate customers, products, reviews and orders table to truncate the customer tables and order tables using the following commands, but i'm getting ...
1
vote
1answer
26 views

Sync Staging and Production Database

How to sync staging and production database? I have staging database and i want to sync it with production database. Production database contains new customers and sales order. I dont want to replace ...
0
votes
0answers
15 views

Magento 2 lifetime sales not refreshing after migration

I migrated products from PrestaShop to Magento 2. The migration went smoothly and all the information has been migrated. However when refresh lifetime sales on the Magento backend they do not get ...
0
votes
1answer
13 views

Magento 1.x addFieldToFilter using AND instead of OR (how can I join search using AND)

I am trying to use AND and OR based on user input. OR = success But I an unable to setup AND queries for addFieldToFilter question: how can I add the second (looped filter) using AND to join $...
0
votes
0answers
24 views

Where can i find the device_name from which the order is placed in magento 2 db?

Need to know the list of the device names appended in the Magento platform and in which table is it rendering from? for example: "device_name": "Smartphone", "device_name": "Desktop"
0
votes
0answers
14 views

Where does that query come from?

My Magento 1.9 store is sometimes reeeealy slow. I noticed that this is because of a long running query. I saw that the following query is running about 30 seconds and is triggered a lot. Any idea ...
0
votes
1answer
13 views

Best Sellers Report

I am having issues where not all items are showing the bestseller block in the admin dashboard. I have narrowed this down to the sales_order_item table. If a product is bought through the frontend ...
0
votes
0answers
13 views

Messed up magento database indexes

Probably due to errors during reindexing, our store got really slow. Reindexing didn't solve it. I activated query log to identify which ones take are slower. Following is one of them. How could I ...
0
votes
0answers
17 views

Use magento functions in another database connection

Would it be possible to use all the functions of the magento with a connection different from the local.xml of the magento? For example I'd like to use: $customConnection->getModel('catalog/product'...
0
votes
1answer
31 views

How to schedule all the cron jobs to run after truncate the cron table?

I truncate my CRON job schedules using this command below: TRUNCATE cron_schedule; I wait some time but I'm not seeing the schedules populating the table again as you can see here. How can I ...
2
votes
1answer
20 views

Remove all customers in a certain group

I have just migrated my M1 site to a newer M2 site, however, this new site will be for wholesale only customers, each of whom are assigned to a different group to reflect their prices. how can I ...
0
votes
0answers
16 views

Mysql Php display data from 3 tables in the database

I want to display data from 3 different tables. I am having an issue with Inner Join. I want to display results in this format: first_name | last_name | fk_rate_code | dob Tables: invoice (id, ...
1
vote
1answer
21 views

Export image information via SQL

I'm trying to export a set of image information from Magento 1.9 via SQL. I'm trying to get an output format like this: sku, value, position 1234, a/b/example.jpg, 2 Tables involved: ...
1
vote
0answers
42 views

Magento 2 Where ship-station (shipping charge) details will save at magento side?

I have installed and configured Auctane_Api ship-station module to magento2. Whenever I placed the orders those information populated at ship-station portal successfully. After processed shipment ...
0
votes
0answers
18 views

Model not saving in database

I have an InstallSchema such as this one: $rodia_Qrcode = 'rodia_qrcode'; if (!$installer->tableExists($rodia_Qrcode)) { $table = $installer->getConnection()->newTable( ...
0
votes
0answers
11 views

InnoDB temporary tablespace size explodes after reindex

Within a Magento 2.2.6 installation we currently have a peculiar problem, where MySQL's Temporary Tablespace of InnoDB (ibtmp1) suddenly explodes in size, growing seemingly indefinitely until the disk ...
0
votes
1answer
18 views

Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

2018-11-20T09:31:12+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-hunderefleksvest-str-m' for key '...
0
votes
0answers
58 views

sql error while adding any products to category : M2

Something went wrong while saving the category.SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mydb....
1
vote
0answers
37 views

Migration from 1.9 to 2.2

I am having a bit of a brain fart here. I am trying to migrate from 1.9.3.7 to 2.2.6 I have attempted to perform this migration before, and the deltas screwed me up. So now, I have migrated the 1....
2
votes
2answers
90 views

SQL query kills entire server

I caught the following query via mysql's SHOW FULL PROCESSLIST; which was eating the whole CPU / RAM on my server (32GB Ram, i7 hexacore CPU) rendering the entire server unusable for more than 3 hours....
0
votes
0answers
10 views

Query to get product list with all in stock and 1 month old out of stock products

Trying to create a query to get all instock and 1 month old out of stock products from database. Have the following query but not working. SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`,...
1
vote
0answers
22 views

Magento2.2.6 - What is the purpose of tables which have tmp/replica/idx as a postfix?

I'm trying to insert queries in order to add products to our Magento website. I have no idea about these tables i mentioned at title like catalog_category_product_index_replica, ...
0
votes
1answer
39 views

Magento2: Asymmetric transaction rollback

Sometimes I found in log file issue: Ran jobs by schedule. string(32) "Asymmetric transaction rollback." Ran jobs by schedule. Ran jobs by schedule. Ran jobs by schedule. Anyone know how it is and ...
0
votes
0answers
21 views

How to save custom data in sales_flat_creditmemo table programmatically Magento 1

I have created a new field in sales_flat_creditmemo table. Please help me in saving the custom data to a newly created field in the table in magento 1. I have tried this but its not saving the data. I'...
0
votes
0answers
16 views

Magento2: How to reduce database size and remove unwanted data? [duplicate]

Database size increased every day. I want to remove unwanted data from the database.
0
votes
1answer
10 views

How to Implement Look inside the Book Feature for Magento 1.9.3.9?

I want to develop a "Look Inside the Book" feature similar to what Amazon has. Does anyone have a suggestion how I could achieve this?
-1
votes
0answers
87 views

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

I have an error when I try to use the Magento 2 CLI on my local environment (Mac / MAMP). For example, when I try to deploy static file with php bin/magento setup:static-content:deploy, I have the ...
0
votes
2answers
26 views

Magento 2 - Accidentally deleted 'admin_passwords' table, no backups

I accidentally dropped the table 'admin_passwords'. What is the command that would re-create it?
0
votes
0answers
10 views

updating sales_bestsellers_aggregated_daily table

Is it possible to make sales_bestsellers_aggregated_daily table to contain only today's bestsellers through corntab.xml configuration? If not please can anyone tell me how can I do that?
0
votes
0answers
9 views

How can we add a custom shipping method and price in magento 2 and fetch it via api?

Is there a way to add new shipping method with input text box values for shipping name and price? Also the values given needs to be stored in db and fetched in api code of Magento.It should be visible ...
1
vote
1answer
40 views

How to delete the content of a table

I'm able to fetch the single items, or the whole tables via the $modelFactory->create()->load(ID) or $modelFactory->create()->getCollection() Using the $modelFactory, how can I delete all ...
0
votes
0answers
20 views

Magento 2 Database Maintenance

I'm wondering which tables can be truncated in Magento 2 to stop the database from increasing in size? I also have a table called 'customer_visitor' which is sitting at 1025058 rows and I'm wondering ...
1
vote
0answers
15 views

How to group conditional filters in Magento 2 data provider

In my component/ui/dataprovider I have the following. class TheProvider extends DataProvider { /** * Get collection data * @return array */ public function getData() { ...
0
votes
1answer
27 views

Magento2 set timezone with mysql query

I am trying to get days difference between 2 dates with mysql query with DATEDIFF function for production_days column: $collection->getSelect()->joinLeft(array('cvo' => 'cp_vendor_order'), "...
0
votes
0answers
67 views

Braintree and mageworx order editor extensions not working together well. Order creation flow is interrupted and can you help us in solving this?

We are in Magento enterprise cloud environment and use Magento 2.2.6 version. We use Braintree extension to process the credit card payments and use mageworx order editor extension to allow us to ...
0
votes
0answers
153 views

Import database error - magento 1

I have copied all the files from a live magento 1.7 to my localhost on WAMP and I exported the database fromt the live. When I import the database in MySQL conslose by: source path/to/db.sql it ...
1
vote
1answer
15 views

Magento 1.9 change server and domain

i wanted to clone a site running magento 1.9.3, I did below steps change DB credentials inside "local.xml" change URL inside DB table "core_config_data" But when i try to access the site its broken ...
0
votes
1answer
49 views

magento 2.2.6 Indexer:reindex error

I get the following error when running the indexer:reindex command for Magento 2.2.6 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DB.catalog_category_product_index_store1_replica' doesn'...
0
votes
0answers
12 views

Magento 2 - Make product reviews visible on all stores (SQL)

I would like to have my product reviews be visible across all my store views. The languages are all in English and it would make sense to display them all for my customers. Looks like the ...
0
votes
1answer
33 views

mysql query to change the postcode field on the billing address

I need a mysql query to change the postcode field on the billing address on customer accounts to blank for user only from one country (Ireland). Currently we have 5000+ user accounts with N/A or NA in ...
0
votes
3answers
45 views

Magento 2 connection after moving

I moved my website to a new server and : 1- Changed database connection app/etc/env.php 2- Cleared the cached files in "/var/cache", "/var/page_cache", "var/view_preprocessed","/var/...
0
votes
0answers
11 views

Trigger on Database of Magento for Customers

I want to activate a customer automatically when you register. for that I created a trigger in the BD of magento. I just want to update the Null value the last record that was added. Is the trigger ...