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
12 views

Database Unnecessary log Table - Magento2

To keep the DB optimized and clean, do we need to set up a cron to truncate the following tables? customer_log; customer_visitor; report_compared_product_index; report_event; report_event_types; ...
0
votes
0answers
23 views

Magento2.3 - I want to display dropdown in page main action on admin panel

How to add custom dropdown here in my custom module.
0
votes
0answers
14 views

Magento- mySQL Data Dictionary initialization failed

I just installed Magento, and it cannot run the DB server.Im currently on Ubuntu 17.10. To reproduce the error I only need to run the mySQL DB Server, and it outputs the following log file: 2020-02-...
0
votes
0answers
22 views
0
votes
1answer
1k views

SQLSTATE[HY000] [2002] Connection refused

9.3.6 website. It works fine but sometime it shows SQL error and sometimes it shows many times in a day. here is its trace records SQLSTATE[HY000] [2002] Connection refused Trace: #0 /public_html/...
0
votes
1answer
28 views

Is there 404 hits list in database?

I was wondering does magento store somewhere 404 requests by default?
-1
votes
0answers
17 views

Magento 2.3.3 Serialization failure: 1213 Deadlock found when trying to get lock

I encountered this problem. When deleting records only in which status = 'error' from cron_schedule table occur such issue: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying ...
0
votes
1answer
12 views

“Unique constraint violation found” in frontend, but no trace in expection.log

I am pretty new to Magento and made a copy of my a production webshop for testing purposes on our server. The website looks to be working fine, but somehow I keep getting "Unique constraint violation ...
0
votes
1answer
26 views

Magento 2 - Update modules without shop throwing exception

I upgraded my modules by calling composer update, then my shop was going offline with the message: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. ...
0
votes
1answer
938 views

process collection after load collection

$categoryid = 43; $layer = Mage::getModel("catalog/layer"); $category = Mage::getModel("catalog/category")->load($categoryid); $layer->setCurrentCategory($category); $attributes = $layer ...
0
votes
5answers
2k views

Magento2: How can i get all orders from database tables

I want to get all orders record from database. How many tables i have to dump for . Kindly enlist the tables names here
25
votes
4answers
26k views

Why and when to use “ Flat Catalog”?

While doing bit research for speed issue of magento website i got some links where people says enable "Flat Catalog" to increase performance and speed . Issue is that why it is not enabled by default ...
1
vote
1answer
942 views

Magento 2 foreign key

Hey i need to setup the install shema of my module with 2 table and a third table thatmake the link between the two. First table have id_provider the second id_company i want my third have the wo id....
0
votes
0answers
12 views

Magento2 AJAX JS Fetch Display

I have a code by which I add information to a database and display it on the same page where the form is (using AJAX), but after refreshing the page, the data disappears (in the database they are) How ...
0
votes
0answers
20 views

I want to override magento2-base module in magento 2.3

I want to override vendor/magento2-base/pub/errors/processor.php file but didn't find any solution. If anyone knows how it can be possible then let me know.
0
votes
2answers
825 views

Submit form values using controller and model in magento frontend module

I am building an module and need to process a form but am having troubles getting the variables to POST and am just redirected to the same page. The form looks like this : <form id="...
0
votes
1answer
731 views

Can't reindex Product Prices: a foreign key constraint fails

I receive an error when trying to reindex Product Prices: "Some problem with reindexing process." Digging some more, I extracted this error message on exception.log: 2015-10-06T17:17:52+00:00 DEBUG (...
0
votes
2answers
112 views

AJAX IN MAGENTO2.HOW TO ADD information from form IN DATABASE?

I already have a form and controller action, that send data without using ajax.How to do it with AJAX? I would appreciate your help! view/frontend/templates/reviews.phtml <form action="<?...
0
votes
0answers
14 views

How to save checkout custom attribute data into customer_entity table in magento 2.3.3?

I already created a custom field using install schema. Now I want to save custom field data into the customer_entity table. Can anyone help me?
1
vote
0answers
19 views

Magento2.3.4 - Switching Catalog Price Scope causes SQL error

After switching the Catalog Price Scope from Global to Website and trying to reindex I get the following SQL error. How do I fix it? Design Config Grid index has been rebuilt successfully in 00:00:00 ...
0
votes
2answers
40 views

Magento2.3 - How to set text column table value default is None using declarative schema?

I want to create a custom table using db_schema.xml like that contains column like this: I tried to do it like this: <column name="description" nullable="false" default="null" xsi:type="text"/>...
0
votes
1answer
15 views

Difference between INDEX_TYPE_INDEX and INDEX_TYPE_UNIQUE

While adding index, it is not necessary for the column values to be distinct. So, in those case what is the Varien_Db_Adapter_Interface which is used in the ->addIndex() function. Also, what is ...
0
votes
1answer
687 views

A clear and good way to add custom fields to billing information

I have tried to search for direct information about how to add custom fields to my billing information checkout. Whatever page I visit, it tells me to buy an extension or it describes steps to ...
0
votes
0answers
23 views

catalogrule_product_price Table Gets Deleted From Our DB After Running Rapidflow Job

I'm not sure if this had happened to anyone before but our website uses Rapidflow extension and we had a cron job running at night for Products and Products Extra data type. We usually had the job run ...
3
votes
4answers
891 views

Magento 2: Adding “updated_at” column does not update current time stamp

I am using Magento 2.2.6 version. Am just trying to add an extra column updated_at in setup/upgradeschema.php. But on saving data, it is not updating the timestamp automatically. It is null always. ...
1
vote
2answers
67 views

How to fetch data from a custom table in magento2 and show in home page

I have created a custom module with a custom table, now I need to fetch the data from the table and display in the home page. I achieved it by applying object manager I know it's not the correct ...
0
votes
0answers
12 views

how to TRUNCATE TABLE in Magento Cloud

I am using Magento 2.3.3 on Magento Cloud. For the pre-launch, I need to TRUNCATE 2 TABLES from the database. How do I enter SQL mode to execute SQL scripts to truncate 2 tables in Magento cloud?
0
votes
2answers
23 views

What is the success rate to comply Magento 2 split database concept?

Currently, we are trying to do the Magento split database concept to split its catalog, checkout, and order master databases. Magento documentation only speak about the very high level https://...
2
votes
3answers
696 views

Magento 2 Down: replica Tales not found when reindexing!

My server went down because the disk was full, after fixing it, I noticed that the magento 2 website never came back: (Magento 2.2.4, PHP 7.0.30) When re-indexing, i get the following error: ...
2
votes
2answers
143 views

Magento 2: How to dump database from Magento cloud

How to dump the database to local system from Magento Cloud server with Magento 2 Commerce. I have only access to the ssh but that ssh user doesn't have write permission into the server. So by any how ...
0
votes
0answers
17 views

Error: Catalog Product Index Website is empty

I'm facing this issue... Sometimes I need to re-enter the information in the table. Any way to resolve this permanently? Thank you for you help.
2
votes
1answer
25 views

What PHP class executes the SQL to select models and collections from the database?

When I have a PHP model or collection of a Magento entity (such as a product or customer), what PHP class(es) is in charge of constructing and executing the SQL that selects that model or collection ...
0
votes
2answers
943 views

Import Database Error: #1062 Duplicate entry '3-13-70-0' for key

I am attempting to export the Magento database from my current installation to a test installation before I have the test installation go live. Both installations are version 1.9.2.1. I can ...
4
votes
2answers
108 views

No index on the url_rewrite table

Is there any reason why there is no index on the entity_id column on the url_rewrite table? Or on entity_id and entity_type? The only index I see is on entity_id and store_id. I understand that that ...
6
votes
2answers
904 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
1answer
20 views

Mysql modify column not working [closed]

What I wanna do is to update the field comment_author and change the type from tinytext to varchar(100) For some reason it complains about "Invaild default value for 'comment_date'" Why does it ...
1
vote
3answers
24 views

Magento2 - How to make custom module for customize maintenance mode?

I want to customize maintenance mode in Magento2. Magento2 error message will be hide and my custom message will be visible. If you know anything related to this then share with me.
0
votes
3answers
575 views

Magento 2 Commerce cloud database export

I am new in magento commerce cloud. I need to setup the magento store in my local system. I have downloaded the files from the commerce git and it is working fine. But how can I access the database? I ...
0
votes
1answer
899 views

Magento 2 add new column to existing table on a running webshop

I know there are few posts regarding how to add new column to existing table in Magento 2. My concern is if I already have a webshop that is running, can I still add a new column to a table? for ...
1
vote
2answers
555 views

CSV product Import stuck on Please wait…" hang

I have a problem with Magento 2 import section. I am trying to import a product from CSV, the page stop loading but the loading icon is always present and Magento don't check data. what is the ...
0
votes
0answers
22 views

Magento2: Update custom attribute using MySql query

I have two custom attributes:- is_featured_product => Yes/No type start_to_date => Date type Now I want to update the status of the featured product to 0 if current Date > start_to_date using Mysql ...
0
votes
1answer
23 views

Magento 2 addFieldToFilter check for NULL not working

What i am doing ->addFieldToFilter('value', array(['eq' => '', array('isnull' => true)])) What i want in the query - '((value = '' )is NULL)` Can anyone help me on this Thanks.
4
votes
3answers
2k views

Magento backup taking too long

So, I decided to make a database backup from the magento admin panel. But it´s taking too long and there´s no way to know if the backup is actually working or if it got stucked. Is there a way to stop ...
1
vote
3answers
390 views

Magento 2 : Postcode / Zipcode and telephone number missing in checkout form

Have just tried to test the checkout form to ensure that my shipping methods are working and the postcode/zipcode and telephone boxes are missing in the checkout form. After doing some research I've ...
2
votes
1answer
138 views

Updating the downloadable products link (and file), when it is changed in admin panel, in Magento 2

I am not really sure if this is a bug in Magento or I am missing something. Every time I change the file (Add a new file) to a downloadable product in the Admin end, the file does not update for the ...
0
votes
0answers
11 views

Magento2 Admin Grid first (Base table) table data store foreign Key table data not store

In Database data store 2 table using foreign key First table store data while another second table does not store data. public function __construct( Context $context, CancelFactory ...
0
votes
1answer
836 views

Base tables already exist

Hi guys I have been trying hard to upgrade a magento 1.3.2.4 to magento 1.7 but it is not playing ball: it keeps saying that the base tables already exists. In particular these are: index_event, ...
1
vote
3answers
784 views

Magento 2:- How to get customers now online?

Magento 2:- How to get customers now online? Want to get all customers data current login.
0
votes
2answers
26 views

output information from the database magento 2

/Block/Reviews.php <?php namespace Training\Reviews\Block; use Training\Reviews\Model\ResourceModel\Reviews\Collection; use Magento\Framework\View\Element\Template; class Reviews extends \...
1
vote
1answer
957 views

Retrieving size attribute text via MySQL in Magento 2

I'm working on a PHP file that will run on cron (outside of the Magento 2 directory). I'm writing some scripts that fetch various data such as customer details and the items they've ordered. ...

1 2 3 4 5 66