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

Where does Magento store the PRODUCT_HAS_WEIGHT attribute

For some of our configured products (unfortunately), the PRODUCT_HAS_WEIGHT attribute has not been set to 1. Although, the products all have weight set (as a float), Magento still refuses to provide ...
0
votes
1answer
670 views

Database connectivity issue in Magento 2.1

I am trying to connect to magento database of another system with the following configuration in app/etc/env.php array ( 'host' => '192.168.1.172', 'dbname' => 'datacenter', '...
2
votes
4answers
208 views

2.3 to 2.3.1 Upgrade showing sales_order_grid already exists

So far the upgrade went pretty smooth but now I have a few outdated modules and it's asking me to run the setup:upgrade on CLI but I keep getting an SQLSTATE general error: 1813 Tablespace for table '...
0
votes
1answer
659 views

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'store_id' in where clause is ambiguous

After searching around I still haven't found a solution so I thought I would post it here. Any help would be greatly appreciated. When I go to filter one of the columns it redirects me to dashboard ...
0
votes
0answers
30 views

What is correct way to create an admin form that doesn't save to database?

My goal is to create an admin page that allows site administrators those with specific roles to change a password on behalf of a customer. At the moment I seem to be having issues creating a page in ...
1
vote
1answer
1k views

How to get visitor data & store detail in database in magento2

I want to get visitor data when any visitor visit magento website. In visitor detail, I want to get IP address, browser name , Operating System Name , First Visit Time, & Last Visit time. How is ...
0
votes
2answers
39 views

Adding data to database from custom form

I'm able to fetch data from custom form but not able to put it in database table. Here I post details of model and controller SimpleMagento\Custom\Model\Name.php class Name extends \Magento\...
1
vote
0answers
23 views

Adding data to database [closed]

I'm able to fetch data from custom form but not able to put it in database table. $model = $this->_name->create(); $entity = $this->getRequest()->getParams(); $model->...
1
vote
1answer
23 views

Magento:2.2.8 Save response in db under custom_column created in sales_order and quote tables

I am using Custom Shipping API where I am getting response from API. Here I want to save this response to my order and quote table, I used event checkout_onepage_controller_success_action Here's code ...
5
votes
4answers
3k 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-...
1
vote
2answers
18 views

Undefined property: SimpleMagento\\Custom\\Controller\\Test\\First\\Interceptor::$getRequest … In controller

Error in controller :- Undefined property: SimpleMagento\Custom\Controller\Test\First\Interceptor::$getRequest .......While fetching data from custom form. Can someone provide me solution or how to ...
0
votes
2answers
670 views

how to solve magento errors as below,

Warning: include_once(/home/archtraders/stationerypoint/includes/src/Mage_Core_functions.php): failed to open stream: No such file or directory in /home/archtraders/stationerypoint/app/Mage.php ...
5
votes
10answers
21k views

Magento 2: New added products not showing

I need some help I have added new products in the Backend and they are showing in the DB but not showing on the front page. Also, previously out of stock products are not showing as well after ...
1
vote
2answers
1k views

SQLSTATE[42S02]: Base table or view not found: 1146

Last night my host experienced what they call "InnoDB engine server is broken". It took awhile but they did a recovery but had some issues with missing tables. I also found out that we didn't have ...
1
vote
0answers
21 views

Magento2.3.3 Facing Error during Data migration

I am trying to migartion from Magneto1.9.3.10 to Magento2.3.3 but I am facing error during [Eav Step] data migration like: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does ...
11
votes
4answers
19k views

Add column Upgrade Schema Magento 2

I want to insert new field for database table in my custom extension using upgrade schema by following this post,but i got an error saying : [Zend_Db_Statement_Exception] ...
1
vote
3answers
27k views

SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine

I have deleted cache, session and reports as per some of the other threads I've deleted some other image files and larger files to bring my disk space down and have also paid for more disk space. I'...
1
vote
0answers
44 views

my.cnf MySQL optimize for 2G RAM Magento 1.9

I'm find my.cnf optimized for 2G RAM. It's good configuration for 2G RAM and magento 1.9 and 5.5.56-MariaDB? Server VPS CentOS 7.5 on SSD. In this case i have about 30 domains in 1 multidomain ...
4
votes
8answers
648 views

How to improve magento site performance

I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow. Some reason I figured out from my analysis : 1) ...
1
vote
0answers
11 views

Magento 2 Custom Table Auto Increament Column value disorder

In my custom module, I have a database table with auto increment col. The columns values initially work fine but when I delete any record the value increased like this order 1,2,3,4,5,6,10,11,110,115,...
1
vote
2answers
4k views

what is <update handle=“customer_account”/>

what is 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 !?
2
votes
1answer
871 views

Safely update SKU from DB Magento2

In a store of mine, built on Magento 2.1.x I need to perform a bulk update on product SKUs. I am thinking about doing an UPDATE directly on the DB, on the catalog_product_entity table, since I ...
0
votes
1answer
609 views

products image upload error after upload 100%

when i upload product image he is complete 100% after error and there is no error show then i write this code in /lib/Varien/File/uploader.php after not show any error and permission is right ...
1
vote
1answer
865 views

Magento 1 can't connect to database

Please Helpme on this,I have copied a live site to a development environment so I can do some testing. I've followed this tutorial to get everything up and running. When I go to the site is says ...
0
votes
1answer
15 views

Magento2: How to check record before save record in table?

I am adding the barcode with product SKU and product ID in a table using below code:- File Path: /app/code/[NameSpace]/[ModuleName]/Model/ResourceModel/Custom.php public function generateBarcodes($...
2
votes
5answers
663 views

Why local.xml always use <host><![CDATA[localhost]]></host>?

I want to see what database a Magento installation was using. If i observe the file /public_html/app/etc/local.xml Surprisingly, it shows a database that doesn't exist, even my hosting server is ...
4
votes
1answer
613 views

slow INSERT query in sales_flat_order_grid

We see in newrelic some peaks if orders are inserted into sales_flat_order_grid. I tried to figure out why, but couldn't find the reason. This peaks appear ~ 1 of 100 orders. First of all I thought ...
1
vote
0answers
558 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 ...
0
votes
2answers
219 views

Magento 2 : run multi query on upgrade database

For upgrade database, I use direct SQL such as belove code $setup->run("delete from directory_country_region"); $setup->run("TRUNCATE directory_country_region"); $...
2
votes
4answers
423 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
669 views

SQL export of products and associated image gallery files

I need to list all product entity_id, SKU and associated images from the value field of catalog_product_entity_media_gallery. I need the output to be CSV based, so all images of each product will be ...
0
votes
0answers
12 views

Save prices with 2 decimals only in database

We have a problem with synchronizing invoices with an accounting software. The product price sent from the synchronization magento module (to the software) is rounded by 4 decimals. In the software ...
1
vote
0answers
18 views

Tool for real time monitoring of sql queries and processes on Magento Commerce Cloud

I need to monitor the number of SQL queries and processes and their corresponding CPU and swap usages in real-time just like the monitoring tool provided with PHPMyAdmin. I need something similar for ...
4
votes
1answer
725 views
0
votes
2answers
1k views

How to remove city as a required field at checkout page in magento 1.9.3.6?

I want to remove required field from city and make it non required field at checkout page. how can i implement this?
1
vote
0answers
10 views

cron_schedule table not emptying itself (deadlock error)

I just realized after cheking my logs that all the queries supposed to clean my cron_schedule table are not being executed properly. My table just keeps on growing. Here are the three exception types ...
1
vote
0answers
8 views

Checkout Totals Sort order not changing

When I attempt to change the checkout totals sort order in Magento 2 backend, I can press save, however the sort order doesn't seem changed from the magento 2 backend. When I look in the database, ...
1
vote
1answer
22 views

Magento 2.3 data insert using Data patch

I have created a new table and added a few data using Data patch setup/patch/data/. Now I want to add some more data and want to update few data's so can anyone please help me or guide me that how ...
2
votes
1answer
943 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 ?
11
votes
3answers
191 views

View product count not updating

There are 3 different tables that stores product viewed count report_viewed_product_aggregated_daily report_viewed_product_aggregated_monthly report_viewed_product_aggregated_yearly If I want to get ...
1
vote
0answers
24 views

Magento 2.3 - Add a new column after one column into the table using db schema

I need to add a new column after one of the particular columns in the existing table using DB schema & checked this dev doc link, they didn't mention about the before or after column. Is there ...
1
vote
1answer
19 views

How set data in table “quote_address”

How to set data in table quote_address after placing an order? ty for answer
1
vote
0answers
41 views

Magento 2 - If search using less than min query length then it gives me error

If search less than min query length it gives me error on the front website in magento2. In catalog search, I have set min query length to 3. And if I search with 2 char length then it giving me an ...
0
votes
0answers
29 views

Issue Google Shopping Index Magento 2.3.3

Trying to setup Google Merchant from Magento version 2.3.3 Now when done and I run: php bin/magento indexer:reindex scconnector_google_feed I get an error: Column not found: 1054 Unknown column '...
2
votes
4answers
79 views

Can't import database Magento 2.3.3

I have created a backup database by command line: php bin/magento setup:backup --db Then I import it to my new PHPMyAdmin, But it shows a bug: Static analysis: 4 errors were found during ...
0
votes
3answers
886 views

Data Migration error In magento 2 intergrity constraint violation : duplicate entry :1-Migration_Default

Error : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME' I reinstall the setup with a fresh ...
0
votes
1answer
758 views

Magento 2: Change DB Name Without affecting core files

I'm running custom script on my Linux Server. I don't want that script to affect my current database. Username/Password/Host will be same. Only DB name is changed. How can I do that without changing ...
0
votes
0answers
23 views

SQL update special price products

I have a strange problem with my special price query update. When I run the query, the special price is updated in the database. But when I reindex and clean the cache, the special price in the ...
0
votes
1answer
30 views

Issue with Customer Order Collection Magento 2

I have a problem with the default Magento core function. I really don't know whether it is a conflict with any other modules. When we go to the customer menu in admin and select any customer from ...
0
votes
2answers
3k views