Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 38568

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.

0 votes
1 answer
246 views

Magento sort categories database

I have this tree of categories in magento with main>subcat>subcat1. 3 levels. I want to sort the first two levels with custom order and the subcategories of the second level alphabetically. I found ca …
G. G.'s user avatar
  • 1,261
0 votes
1 answer
136 views

Magento 1.9 database query help

I found a query so I can mass change something in my products description. With this script: <?php require_once('app/Mage.php'); Mage::app('default'); $collection = Mage::getModel('catalog/product') …
G. G.'s user avatar
  • 1,261
0 votes
1 answer
1k views

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a c...

After created a shopping cart rule for grouped product I got that catalog_product_attribute indexer needs reindex. When I tried to reindex from console I got: Product Attributes index process …
G. G.'s user avatar
  • 1,261
0 votes
Accepted

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a c...

Solved. Solution was to run these queries after full backup: delete FROM `catalog_product_entity_datetime` where entity_id not in (select entity_id from catalog_product_entity); delete FROM `catalog_ …
G. G.'s user avatar
  • 1,261
2 votes
1 answer
2k views

Magento 2 MySQL server has gone away

I managed to migrate magento 1 to new magento 2.2.5 When I reindex for the first time I get in indexer Category Products [2019-02-07 21:58:57] main.CRITICAL: Warning: PDOStatement::execute(): My …
G. G.'s user avatar
  • 1,261
0 votes
Accepted

Magento 2 MySQL server has gone away

I managed to solved this. Problem was not really on mysql. Problem was because of wrong in the migration process. Although I got no errors there. This migration was the uber migration tool. When did …
G. G.'s user avatar
  • 1,261
2 votes
0 answers
270 views

Magento 2 change database collation

I am wondering if it is safe to change a magento database collation from utf-8 general_ci to utf-8 unicode_ci. I can do it from phpmyadmin or directly in mysql... … So I don't have a clue why this is happening and I thinking to change database collation. Anybody has ideas please? …
G. G.'s user avatar
  • 1,261
0 votes
1 answer
653 views

Magento 2.3.1 Base table or view not found

Magento 2.3.1 keep filling logs with these errors: system.log [2019-05-04 23:30:12] report.INFO: SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index …
G. G.'s user avatar
  • 1,261
1 vote

Using Magento 2.3.2 with MySQL 8.0: Which problems could arise?

We just upgraded to 2.3.4 then we dumped the database from Percona 5.7 After we upgraded to Percona 8.0.18-9. At last we imported the database to new Percona. … Before importing the database to Percona 8 we used some things of this Blog(@Erfan also mentioned it) mysql> SET persist enforce_gtid_consistency=on; mysql> SET persist_only gtid_mode=on; This is just …
G. G.'s user avatar
  • 1,261
1 vote
1 answer
2k views

Magento 2 Price not updating in all store views when scope set to global

In my magento 2.3.5 instance I am trying to switch price to global scope. I don't need the function to have different price for a product in each store view. Unfortunately this store is migrated from …
G. G.'s user avatar
  • 1,261
2 votes
1 answer
2k views

Magento 2.4.4 error in setup:upgrade

I completed successfully composer update magento 2.4.3-p1 to 2.4.4 Also my template and all modules are ready for 2.4.4 magento But in setup:upgrade I got this: Unable to apply data patch Magento\Cata …
G. G.'s user avatar
  • 1,261
1 vote
2 answers
1k views

Magento 2.3.1 clear carts and start over

I want to clear all shopping carts from database and start from scratch. But I don't want to create problems in database for my customer accounts or store orders. … I am thinking to use this queries in database: SET FOREIGN_KEY_CHECKS=0; TRUNCATE TABLE `quote`; TRUNCATE TABLE `quote_address`; TRUNCATE TABLE `quote_address_item`; TRUNCATE TABLE `quote_id_mask`; TRUNCATE …
G. G.'s user avatar
  • 1,261
0 votes
0 answers
18 views

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: Afte...

For some reason we had a problem with magento 2.4.6 databaase and we forced to restart database without checking that indexers were working. …
G. G.'s user avatar
  • 1,261
2 votes
Accepted

Magento 2.3.4 Could not save product "id" with position 0 to category (id of category)

For whom having the same issue with migrated Magento 1 stores. In magento 1 there was an attribute in db: url_path This is migrated to magento 2 and probably it shouldn't. So if you truncate this at …
G. G.'s user avatar
  • 1,261
2 votes
1 answer
1k views

Magento 2.3.4 Could not save product "id" with position 0 to category (id of category)

although I have already this patch Magento official patch which claims that it solve this I keep having this issue with duplicate urls in my database. …
G. G.'s user avatar
  • 1,261

15 30 50 per page