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
0
votes
0answers
11 views

Magento 2 Output Custom Category Attribute

I created a custom category attribute attribute - Category Heading - That I want to display on Category pages (specifically taking the place of the category H1s in title.phtml). The new attribute ...
0
votes
0answers
55 views

The search term shows SQL injection in magento 1.9

I have found below search term on my magento 1.9's admin panel: epoxy) UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL-- QBrO ../../../../../../../../etc/passwd AND 1=2 UNION SELECT ...
0
votes
0answers
17 views

MySQL 5.7 migration error

I have some issues regrading migration from ubuntu (Server 1) to windows MySQL (Server 2). First of all, I had installed MySQL migration tools on Server 2, and when i try to migrate the data, Server 1 ...
0
votes
1answer
38 views

Magento 2 Db migrate

I'm having a magento with thousands of product and attributes. I have to just add the product in new install magento without any configuration changes in new magento. Any option to migrate database to ...
0
votes
1answer
42 views

Move house number from street 1 into street 0 for existing address in db - Magento 2.3.5

At the moment we use the street 1 field for the house number in our Magento 2.3.5 store. But we want to revert this and only use 1 street field for both the street and house number. So we need to move ...
2
votes
0answers
54 views

Magento 2.3 How to apply coupon code discount on regular price

When I apply a coupon code on the cart, it gives a discount on the final price if a special price is set. But I want to apply a discount on a regular price ( If a special price is set on that product) ...
0
votes
1answer
101 views

How to get customer and company data in a CSV file from MySQL?

I'm running a Magento Commerce Cloud B2B, and I need to get a list of these data below. Customer ID Customer Name Company Name Company User Agreement As I can't export a file with these pieces of ...
0
votes
0answers
45 views

RDS parameter group for Magento

I am running Magento 1.9.3.8 on EC2, database running MariaDB 10.1.34 on separate AWS - RDS instance which is db.r5.xlarge vCPU: 4 RAM: 32 GB I have defined various MYSQL variables under custom RDS ...
0
votes
1answer
206 views

What version of MySQL is actually supported?

Was running Maria DB 5.5, tried to install Magento CLI 2.4.0, Amazon Linux / nginx Got this error. Sorry, but we support MySQL version 5.6.0 or later. Ok. So I install MySQL 5.6. It seems to be ...
0
votes
1answer
273 views

MariaDB or MySQL Magento 2.4 “magento community edition open source”

We are in the process of planning for an eCommerce project with Magento 2.4 "magento community edition open source" for building up the e-commerce project. But we are really confused with ...
0
votes
1answer
122 views

Magento2 Elastic Search Configuration Issue

I am using following configurations for my magento2 project Ubuntu 18.04 PHP 7.2 MYSQL 5.7 Elastic Search 7.x Magento 2.3.5-p1 When i enabled elastic search in magento2 admin panel , the connection ...
2
votes
0answers
90 views

How to switch from Mysql 5.7 to 8.0 in Magento 2.4

I was developing Magento 2 with MySql 5.7 but on production server there is MySql 8 installed which is giving me some query errors. After following a guide of migrating from MySql 5.7 to MySql 8.0 it ...
0
votes
2answers
49 views

Get all products that have a custom attribute of a value

Ive made a new product attribute called "product_price_family" in magento2 admin panel. This is a dropdown value. I have changed the value of product_price_family of 5 products to "test&...
0
votes
0answers
13 views

Magento2 fetch value from catalog_compare_item table

Magento2 How can I get the value of following table 'catalog_compare_item' using a model or any other proper way of Magento?
0
votes
1answer
975 views

Magento 2 : Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails while saving a duplicate category

I have installed Duplicate categories Extension in the client site(Magento 2.3.2), while duplicating categories I'm facing this error, {"0":"SQLSTATE[23000]: Integrity constraint ...
0
votes
1answer
39 views

Is there any method of writing a mysql query and saving the result in a .csv file from Magento?

i'm pretty new at sql queries and using the terminal in general for accessing data in MySQL and Magento. I've been asked to export a daily list of database entries in a Magento database and export ...
0
votes
1answer
48 views

Insert shipping address to an existing order in Magento 2.2

I am trying to insert billing & shipping address for some existing orders. We had a product mistakenly set as virtual product and some customers purchased it. Now I need to manually insert their ...
0
votes
0answers
10 views

Different MySQL servers with Magento2, how to use MAMP Databases instead of Brew

I am currently quite new to programming. I believe I may have installed two different MySQL servers as I have different databases when I load up 1)Via Brew and 2)PHPmyadmin via MAMP. This might be ...
2
votes
0answers
50 views

After Upgrate Magento 2 from version 2.2.5 to 2.3.4 Integrity constraint violation: 1452 Cannot add or update a child row

I am trying to upgrade Magento 2 version from 2.2.5 to 2.3.4 using CLI. Version up-gradation is done. After version upgrade when I run bin/magento setup:upgrade it will give an error as follow: ...
0
votes
0answers
126 views

Magento 2 Setup Upgrade Base table or view not found How To Find Which Module Is Causing It or Which File?

I'm getting this error on running php bin/magento setup:upgrade -vvv Schema creation/updates: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'farouni_mage255.mg0f__moulay' doesn't exist, ...
0
votes
1answer
401 views

In Custom table always create a new row in magento 2?

I have created a custom table and update data using model and resource model. But it always create a new row on hitting ajax how to update row as old data is appear. I think i want to use Update query ...
0
votes
0answers
17 views

Remove items from order items using SQL query Magento 1

Is there any way we can remove some items/ some SKU's from order items for multiple orders using MySQL query in Magento 1 in a script? Feel free to share thoughts on this.
0
votes
1answer
22 views

How to add from & to date filter in magento script?

Here is what i have tried $orderItem = Mage::getModel('sales/order_item')->getCollection(); $orderItem->getSelect() ->joinInner(array('order' => Mage::getSingleton('core/...
0
votes
0answers
26 views

How to add complex query in magento 2 collection?

I have a query something like this SELECT * FROM `zip_codes` WHERE (`code` = '123456' OR ('123456' BETWEEN `from` AND `to`)) AND (`use_label` = 1) can someone please tell how we add this condition to ...
0
votes
0answers
8 views

Filter orders that have null value in sku in its order items Magento 1

So far i have tried this <?php define('MAGENTO', realpath(dirname(__FILE__) . "/..")); require_once MAGENTO . '/app/Mage.php'; umask(0); Mage::init(); Mage::app()->addEventArea('global'...
1
vote
0answers
39 views

Move Customers, Products and orders to new site

I have just finished setting up a new site and I need to move the customers, products and orders/invoices to it from an existing Magento site. Both are v2.3.5, I don't want to just transfer the ...
0
votes
0answers
33 views

Magento 2.How get data of customer_entity_text table?

I create extra field in reg.form ('other_data') after registration -> in table 'customer_entity_text is created row with: 'entity_id' 'value' I need this rows, how I can get this? ty fow answer
0
votes
1answer
67 views

How to save custom table data in Magento 2?

I have created a table using a Controller and Model and in that file show some data. But i don't know how to save that data in database i have created a table in Magento 2 db. But don't understand how ...
0
votes
0answers
31 views

How to save data from Magento 2 Backend(Admin)?

I have a custom table in which i have some data for that data there are some text and select box field. I want to save these data in database custom table. I want to save the data like order id and ...
0
votes
0answers
17 views

Return raw procedure in Laravel

I try to execute a procedure, and this procedura have return, but didn´t work. $retorno = \DB::connection('sqlsrv05') ->select(\DB::raw("DECLARE @DATA DATE SET @DATA = '".$data.&...
0
votes
1answer
207 views

Magento2 - php bin/magento setup:upgrade - Access denied for user 'user'@'localhost' (using password: NO)

Fairly new to Magento, I am trying to develop a custom module and have run the CLI command php bin/magento setup:upgrade. However I am getting the following error; SQLSTATE[HY000] [1045] Access denied ...
0
votes
1answer
56 views

Magento 2: How to Show different quantity for specific product type in product grid?

I have a custom table for specific product type to store the product qty, the query to select the qty is like this for example: SELECT a.qty FROM custom_product_table WHERE product_id = 1; i noticed ...
0
votes
1answer
32 views

Change database in Resource model

I split my database on 3 parts. In my env php is set default, but in one of my model i need to connect to table wich located in different db. How can i change target db?
0
votes
0answers
7 views

Magento 2 insert in concurrent series

I have a multiseller store. I'm creating a seperate seller invoice within series. My table data is like below id seller_id invoice_id invoice_series order_id For example if a seller name is John, I ...
0
votes
1answer
61 views

Migration from 2.2.4 enterprise to 2.3.5-p2 - setup:upgrade mysql error

I am working on a 2.2.4 enterprise to 2.3.5-p2 migration. I have gone through all steps such as composer, internal modules solutions, until setup:upgrade step. I searched for solution on the web, and ...
0
votes
0answers
15 views

When i want to checkout sometimes then error will be show i am using (Elavon Payment Method)

[2020-08-18 09:43:25] main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'eshoppy_porto.installments' doesn't exist, query was: SELECT main_table.* FROM installments AS ...
0
votes
1answer
21 views

I created a custom Module, but table is not created, i also checked in core_resource, it's not there

Here is the code config.xml <?xml version="1.0"?> <config> <modules> <Bms_Calls> <version>0.1.0</version> </...
0
votes
0answers
19 views

Setting Magento 1.9.x Lock file storage DB or FILE

how can we change Magento 1 lock file storage from FILE to DB? We see the setting global/index/lock/storage being checked for in Mage_Index_Model_Lock And see it is used in method protected function ...
0
votes
1answer
274 views

Magento 2 : get Mysql Query of products

I wanna show in my mysql query of all attributes name,product name, product status is 1 and sku but in my query its not showing product name and status so could you help me in my this query ? SELECT ...
0
votes
2answers
251 views

Magento 2.3 - How to solve Multi-Site Eway Payment page Mysql error

How to solve the following error, Network Error : trace: "#0 /var/www/html/test/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Checkout\Model\...
0
votes
0answers
40 views

Magento2 - How to save dynamically created field in Admin?

I have created a menu in Magneto2 Back end and added some fields for add remove fields Like this. How to save these data in Database custom table I have created a custom table using Setup ...
0
votes
2answers
221 views

Table prefix error when running - setup:db-declaration:generate-whitelist

I've run the command php bin/magento setup:db-declaration:generate-whitelist --module-name={Vendor_Module} and receive the following error... Magento was installed with a table prefix. Please re-...
1
vote
0answers
116 views

Deadlock error during adding products to cart Magento 2

We have upgraded the Magento website from Magento V2.1.4 to Magento V2.3.3-p1 on End of the March and running well. Recently having problem with Deadlock see error below. LATEST DETECTED DEADLOCK ...
1
vote
0answers
77 views

MySQL 8.0 vs Percona

We're setting up a new Magento 2.4 project. As we can see in the technology stack requirements, the recommendation for database is MySQL 8.0. Could anyone explain whether it's better to choose MySQL ...
0
votes
0answers
10 views

Removing images from product - problem with database data

I am trying to remove specific images, by given product ID and img value id. My initial data is with array of product ID-s My problem is that, when I use my custom function, everything seems fine, the ...
0
votes
0answers
37 views

Magento 2.3 Split database, I have facing issue for fetch records

I'm using magento 2.3, for some customisation we are using joins tables for show the records on the grid in admin. Now we splited our database so, Now join tables are not working. Is any other way to ...
0
votes
0answers
24 views

How to migrate my database using another crypt key?

I have two Magento 2 stores, I'd like to create a database dump and import it into my second store, which uses a different crypt key. When I do it, I see this issue below running bin/magento setup:...
0
votes
1answer
239 views

How to synchronize Magento Cloud environments?

I have three environments, Production, Staging, and Integration, I'd like to sync Integration DB and Code as its parent environment, which is Staging. How could I sync the database and the code?
0
votes
1answer
60 views

Empty rows in quote tables

I noticed that my database size has been increasing a lot since moving over to Magento 2. Looking at the table sizes, it all seems to be relating back to quotes. The largest tables are: quote_address ...
1
vote
1answer
673 views

Magento 2.3 - How to bulk import attributes values?

What is the best practice to bulk import attributes values. How to do it by hit tables?

1
3 4
5
6 7
71