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
2
votes
1answer
37 views

How to create table database and data saving into the table in Magento 2 [closed]

I want to add a table into the database and get input from a custom form
0
votes
1answer
26 views

Possible to using SQL query to get last 30 minutes created account from Magento?

Possible using SQL query to get last 30 minutes created customer account from Magento? I want to run a cron job that it can get the last 30 minutes created customer account id. so base on ID, I can ...
0
votes
1answer
15 views

Data Migration Tool with splitted database

I would like to migrate data from my Magento 1 website to the new Magento 2 one. In the Magento 2 instance, I've splitted the database for performance reasons (https://devdocs.magento.com/guides/v2.4/...
0
votes
1answer
160 views

Failed to read auto-increment value from storage engine catalog_product_entity_varchar

Can't add a new product and get an error. SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine, query was: INSERT IGNORE INTO catalog_product_entity_varchar (...
0
votes
0answers
15 views

SQLSTATE[42S02] at Admin Login

Using Magento 2.3.3. happy_mage300 database in phpmyadmin There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table 'happy_mage300....
0
votes
1answer
11 views

Fetch data and arrange sequence in given format

This is my array: <?php $sku = ['HH017','HH018','HH005','HH010','20OZHHTUMBLER', '30OZTUMBLER2','HH006','HH-05']; $sequence = ['HH005','HH010','HH006','20OZHHTUMBLER',...]; print_r(sort($...
0
votes
1answer
46 views

Magento 2 Update mass Product description using $mysqli->real_escape_string() using core php root script

After migrating all data from Magento 1.9 aproximat 800 product have static image urls in descriptin. {{skin url="images/seringue.gif"}} So I have created one root script to update all ...
0
votes
0answers
33 views

How to use Magento 2 with MariaDB Data-at-Rest Encryption for HIPAA compliance

As one of the requirements for HIPAA compliance is to store all Protected Health Information (PHI) encrypted at rest, and since customers, quotes, orders will be considered as PHI, I thought that ...
0
votes
0answers
39 views

If I run setup:upgrade its giving below error

I have uploaded new module and trying to upgrade its giving below error. SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds ...
0
votes
1answer
55 views

SQL query to get products enabled, in stock without images?

I'm running a Magento 2.3 and I would like to run a query in my database to export some products data that I don't have natively via the admin panel, the attributes are: Status Stock Images How ...
0
votes
1answer
22 views

Change stock availability of products based on qty

I'm looking for a query to get all my products that have "qty > 2 and 'stock availability = 0'" and change the stock availability to 1. A crash on my inventory update routine did a mess ...
0
votes
2answers
36 views

how do I change this sql query to magento get data method?

I have below sql query, how do I turn this to Magento get data method to retrieve data? Please help SELECT sales_order.increment_id, sales_order_payment.additional_information FROM sales_order LEFT ...
0
votes
0answers
17 views

Magento 2 with redis site not loading

I have configured the Redis cache as per Magento documentation. But if I run the cache:flush command the site loads lot of time and I'm using AWS RDS, The CPU of the RDS instance is 100% used. I also ...
0
votes
0answers
38 views

export magento 2 database with different method

i used Ubuntu OS and now mysql is not work, when i export database using ssh command in local terminal, i used this command for export DB : mysqldump -u root -p fastestsample > fastestsample_bkp....
0
votes
1answer
12 views

Set all categories to use Config Settings for 'Default Product Listing Sort By' option via SQL

I want to set all of my Magento 2 categories to 'Use Config Settings' for the 'Default Product Listing Sort By' within the Category Display Settings. I don't want to do this manually as there are ...
1
vote
1answer
11 views

where I can find all the order numbers from the Database table?

where I can find all the order numbers from which Database table? I did some research, but I don't see sales_flat_order in my database. Please help
0
votes
0answers
27 views

How do I change the code in a Magento 2 extension without editing. I need to import csv file, but it will reflect the two tables in database

How do I change the code in a Magento 2 extension without editing it's files directly. I need to import csv file, it will reflect the two tables in database.
0
votes
1answer
41 views

Find all SKU products with tier price?

I want to compare products with tier prices from two databases. From database Magento 1 and Magento 2. Compare them to generate a list of products from Magento 1 that do not have tier prices in ...
0
votes
0answers
20 views

Magento 2.3.5 - Flat Catalog module has a limit of 64$d filterable and/or sortable attributes

I'm getting the error below during my setup:upgrade: The Flat Catalog module has a limit of 64$d filterable and/or sortable attributes. Currently, there are 67$d of them. Please reduce the number of ...
0
votes
1answer
22 views

How can I know from which file the table error is coming for?

I updated some modules and went up this "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_prod.amazon_nding_authorization' doesn't exist, query was: DESCRIBE ...
0
votes
0answers
21 views

Magento 2 error: lock wait timeout exceeded. query was: update session set session expired =?

Some of my customers get this error randomly. And there are sleep query commands in mysql with no info. How can I solve this?
0
votes
1answer
43 views

Update SKU, Product Name, Product URL key via database

I would like to ask for a help or hint, how to update SKU, Product Name, Product URL Key via database. My reference (key) is old sku and I have all data in excel sheet. I have about 600 products to be ...
0
votes
2answers
23 views

How to add tables to database with foreign key?

I'm trying to extend costumers to add some wholesale info we need, so I'm trying to create a module with an InstallSchema to create, let's say, the table 'wholesale_info' with some columns and getting ...
0
votes
0answers
17 views

Foreign key checks not working while running datapatch

I've created this datapatch to migrate some attributes (width, height, depth) from a varchar attribute to the decimal counterpart. Since both have been in de database for a long time I have to account ...
0
votes
1answer
80 views

Inventory View inventory_stock_1 causing database locks

After moving databases we are getting spikes in our database from PDP pages with the following query, and it ends up taking a full minute to query. SELECT `inventory_stock_1`.`quantity`, `...
0
votes
0answers
23 views

Filter product collection with nested OR/AND statements

I want to make a query as below WHERE manageStock = 0 OR (manageStock = 1 AND productStatus != 0) OR (manageStock = 1 AND backorderStatus = 1) but I can't use $collection->getSelect()->where() ...
0
votes
0answers
21 views

Internal Server Error

I just hosted on Godaddy, and i downleded magento 2.3.6 from magento official site and i uploaded it into filemanager, when i run the URL, it is showing 500 error. Can you please guys help me this. ...
1
vote
1answer
55 views

Upgrade Magento 2.3 and store code base is not found

I upgraded my Magento 2.3.1 to 2.3.6, I'm seeing this message in the frontend. The website with code base that was requested wasn't found. Verify the website and try again. How could I fix it?
1
vote
0answers
198 views

Reindex process hangs and blocks website

I have a problem in my Magento 2 (version 2.3.4) shop that reindex process sometimes runs indefinitely and brings the whole site down (502 nginx error or timeouts). I noticed on the DB level, that in ...
0
votes
1answer
23 views

Magento 2.3 localhost Blank page Frontend and admin

I'm trying to transfer my test site from web space to local (I'm running low on maximun allowed size) I've downloaded my database and a copy of the site. Through Xampp I've imported the database, I've ...
0
votes
1answer
59 views

Magento2 custom sql to get data from external table and import into product

In Magento2 I am trying to connect to an external database and table and use the data to update a custom product attribute where the sku' match in both tables. I temporarily put this code in my footer....
0
votes
1answer
19 views

Can not display all column from a table

I have a table name my_cars. There are 4 column in my table. I create collection, model, recourse model,controller and block. And i can display data from my table. But all column of data not ...
0
votes
1answer
243 views

How to get checkbox value and save it on database

I have added a custom checkbox in checkout page, and I have added a custom column to sales_order and sales_order_grid tables, now I want to get the value of my checkbox and save it in my custom ...
0
votes
1answer
116 views

Magento 2.4.0 Installation Error

I am getting this error in during installation of Magento 2.4.0 on Live server. Please help if you can. Current version of RDBMS is not supported. Used Version: 5.6.49-cll-lve. Su pported versions: ...
0
votes
2answers
45 views

How to get All product data from magento 1.9 database

I want to gather all my product from magento 1.9 database and upload on other site of magento 1.9 any one know how to do that ? Thanks
0
votes
0answers
286 views

Magento 2.4 - Port must be configured within host parameter Pls Help

I can start the setup via Command Line. And I get no Errors. But if i enter the homepage i got this error: [2020-11-03 23:11:17] main.CRITICAL: Port must be configured within host parameter (like ...
0
votes
0answers
14 views

where prepared query to base can see

For example my repository get items by getList($searchCriteria) where I can see prepared query to base like this SELECT * FROM table. I am use xdebug so I need a line of breakpoint or name of function....
0
votes
0answers
11 views

Collection join to diffrent databases table

My Magento project has 2 connetions: default,whmanager. $joinConditions = 'main_table.product_id = catalog_product_entity.entity_id'; $collection->getSelect()->join( ['...
0
votes
0answers
81 views

Magento 2.4 Docker - Port must be configured within host parameter

I can start the setup via Command Line. And I get no Errors. But if i enter the homepage i got this error: [2020-11-03 23:11:17] main.CRITICAL: Port must be configured within host parameter (like ...
0
votes
0answers
20 views

Filter and sorting not working in custom culumn in upsell_product_listing.xml

I have joined column qty to Magento\Catalog\Model\ResourceModel\Product\Collection But Sorting filter by qty not working and sorting too in upsell_product_listing /app/code/Vendor/UpsellProducts/etc/...
0
votes
1answer
100 views

How to fix skip to content option in magento 2

I have issue with the magento2. When we open a website the skip to content appear before loading the complete website . How i remove this option. Image is atatched.
1
vote
0answers
41 views

The stock item was unable to be saved. Please try again. Magento 2.4.0

I installed magento 2.4.0 on my Linux server from godaddy. I'm unable to add the products to it. It is showing the Error is The stock item was unable to be saved. Please try again. Can any one help me ...
1
vote
0answers
118 views

Invalid entity_type specified: catalog_category magento 2?

I created a custom column using my custom module after that I removed that custom column manually from table mg_catalog_category_flat_store_1 magento 2 phpmyadmin after that this error accur in ...
0
votes
0answers
108 views

Magento 2 search 3 characters with hyphen not working

Magento 2 search 3 characters with hyphen not working Example - product SKU is 4-e - it gives lots of search results instead of related to 4-e results(not giving related with 4-e) there is no ...
0
votes
0answers
82 views

I have slow mySQL queries causing very slow backend when we do changes or editing

this can be confirmed from the following snippet, showing slow queries that are taking almost 3 seconds to run: | 1105858 | handyimp2_handydb | localhost | handyimp2_usrhand2 | Query | 3 | Creating ...
0
votes
0answers
33 views

Get data from DB (load method) Magento 2

I have controller, template, view. I need using load method, but i don`t know how i do that $post = $this->collectionFactory->create(); $this->collectionFactory->load($post, '...
1
vote
0answers
190 views

Magento 2.3 crashing on never-ending search_tmp_* queries

I'm using Magento 2.3.2 and a production site that has a decently large number of products. The site has been running fine for over a year but in the last week we suddenly have an issue where a ...
0
votes
1answer
22 views

Magento2.4 mysql to make all products a product type of simple

I imported all products into Magento2.4 using a plugin and just noticed 100 or so products have no product type which is causing them not to show on the website. How can I run a query on the database ...
0
votes
1answer
18 views

Magento 2 Image Gallery pure SQL Manipulation

I've written an interface for Magento 2 admin that allows creation and editing of key product attributes from a phone. Once a product is created and it's images attached to the product, I have been ...
0
votes
0answers
15 views

from host to another

i have magento 2.3 i restored databse and copy all file in directory of server 1 to server 2 change the name and username and password for database from env.php remove all file from var/...

1 2
3
4 5
71