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
751 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
346 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
726 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
33 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
47 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
1answer
27 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 ...
1
vote
2answers
25 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
700 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
23k 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
53 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
21k 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
28k 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
152 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
727 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
14 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,...
2
votes
1answer
984 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
619 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
926 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
24 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
694 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
617 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 ...
0
votes
2answers
337 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
650 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
724 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
13 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 ...
4
votes
1answer
776 views
0
votes
2answers
2k 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
12 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
17 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
161 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
1k 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
225 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
42 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
25 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
77 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
83 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
175 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
1answer
841 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
39 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
4k views
0
votes
0answers
20 views

magento 1.9 | process starts mysql on its own

My site automatically turns on mysql process, which loads the database and CPU sometimes to 120% and some other processes are also running, but I can’t understand what it. because of this, the site ...
0
votes
1answer
26 views

Magento 2.2 : Upgrade customer_eav_attribute table 2.1 to 2.2

After updating Magento 2.1 to Magento 2.2 I get the following error when saving a client. I have seen that in the customer_eav_attribute table the data has not been updated correctly to the new ...
2
votes
1answer
2k views

Magento 2.1 data migration SUPER privilege error

When running the data migration tool php bin/magento migrate:data vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.0/config.xml We get the following error: [Zend_Db_Statement_Exception] ...
0
votes
1answer
23 views

magento error after instal

after install magento I have error: An error has happened during application run. See exception log for details. in exception: main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 ...
1
vote
1answer
360 views

row_id vs entity_id in magento 2.3 EE

In Magento 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 entity_id in EAV tables
0
votes
0answers
16 views

Table media_storage_file_storage doesn't exist

Ever since upgrading to Magento EE 2.3 from EE 2.1, I see lots of exceptions reported for Table 'magento.media_storage_file_storage' doesn't exist Nothing appears to be broken, but I'm not sure ...

1 3 4 5 6 7 66