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
1answer
756 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
1answer
12 views

Create an SQL script to find a simple product name with its configurable product SKU In Magento 2 [Magento 2]

Create an SQL script to find a simple product name with its configurable product SKU In Magento 2 [Magento 2] Anyone with a better solution than my one are appreciated. Please share your answer.
1
vote
1answer
2k views

Magento 2 slow category page, search_tmp tables

I'm trying to debug a slow Magento 2 category page, containing more than 10000 products. The following query keeps coming back, sometimes even blocking other queries and slowing down the whole site. ...
0
votes
2answers
656 views

Magento 1.9 How to use old database while installing fresh magento

I wish to install fresh magento 1.9.2.3 using the same database of magento 1.9.2.2 During installation process when I give the same database name as of magento 1.9.2.2 It shows error as"Database ...
0
votes
1answer
12 views

Possible raw SQL statement detected. delete from $tableName WHERE sku = $productSku

the code is working well and doing it's job but pipeline on bitbuckets drops an error Possible raw SQL statement "delete from $tableName WHERE sku = $productSku " detected. my function where this ...
2
votes
5answers
714 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 ...
0
votes
0answers
11 views

Running data recurring [duplicate]

crated data patch but it stucks on setup:upgrade Running data recurring... my code is <?php declare(strict_types=1); namespace DevAll\ExtensionSettingConfig\Setup\Patch\Data; use Magento\...
4
votes
1answer
805 views
0
votes
0answers
18 views

I created data patch, setup:upgrade never finishes

I have created data patch, After I run setup:upgrade it does the job but never finishes setup upgrade command . https://i.imgur.com/Mhilmgd.png https://i.imgur.com/GtUDbLV.png the Data patch itself ...
0
votes
1answer
30 views

data patch changes does not affect database

I have created Data Patch, debugged it and everything works as expected, products are removed from the collection but after running setup upgrade changes are not made in the database, what can be ...
0
votes
1answer
678 views

How to make arrow visible for all the time on Slider banner

I want to use fontawesome icon for arrow on my Slider banner for Next & Previous. What code I have to use for Magento 2.1.1? Can anyone please help thanks me.
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 ?
0
votes
2answers
12 views

How to stop db.log in magento 2.3

How to stop the DB log i had used the CLI to stop but it is not stopping it increasing to huge file. I used the below command but it is not stopping. It is in the path var/debug/db.log bin/magento ...
1
vote
5answers
684 views

magento2 creating a lot of catalogrule_product_temp tables

Magento2.2.5 based multisite (multi store view)seems to be creating a lot of temporary tables such as catalogrule_product__temp9a310576 catalogrule_product__temp998786f4 etc... However I am not sure ...
1
vote
3answers
1k views

Problem Sessions Database - Magento 2

Today I saw my Magento database and in a few months, it went from a weight of 300MB to 2GB. I saw which of the tables was heavier and I saw that there is a 2GB SESSION table. Why do the sessions are ...
1
vote
1answer
5k views

Where the actual data of custom attribute is stored in magento 2?

I have added a custom attribute in existing table catalog_category. The following code i have write in InstallData.php. namespace BelVG\AdditionalImageTemplate\Setup; use Magento\Framework\Setup\...
0
votes
0answers
14 views

When i run Setup upgrade CLI i got SQLSTATE[42S02]: Base table or view not found

Please give me the solution for this problem, I didn't change any modules i can't catch this error how it occured > SQLSTATE[42S02]: Base table or view not found: 1146 Table > 'amtdb....
0
votes
0answers
12 views

Removing products from the database using datapatch

I am removing products from the database using datapatch but changes are not made in the database. When debugging, everything works fine. My data patch is: <?php declare(strict_types=1); ...
0
votes
0answers
24 views

SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers Magento2.1.9

I am getting Server sent charset unknown error during setting up magento 2.1.9 on localhost. PHP version - 5.6 or 7.1, MySQL version - 8.0 I tried to add in my.cnf [client] default-character-set=...
0
votes
0answers
23 views

Strange error when upgrading

when trying to run setup:upgrade i'm getting the error below. I dont remember having any issues on my store. I've tried to enable verbose on the upgrade using setup:upgrade -vv but wiithout success ...
1
vote
0answers
23 views

How to fix error while running setup:upgrade command Magento 2

When I run setup:upgrade then I got this error after Schema creation/updates. If you know any solution then let me know. I have 'wishlist_item' this table on 461. Thanks SQLSTATE[42000]: Syntax ...
0
votes
0answers
8 views

Which is the best way to use database connection in phtml file in Magento 2

Which is the best way to use database connection in phtml file in Magento 2 Only for fetching single result from the custom table table because most of the time I am facing error like "User ...
0
votes
1answer
871 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 ...
3
votes
2answers
508 views

{“0”:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name'

Any Help Highly Admired, i'm using Magento 2.2.8 did all commands,upgrade, reindex, static file , etc still not worked {"0":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in '...
3
votes
4answers
987 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
8k views

PDOException: SQLSTATE[HY000] [2002] Connection refused

I'm getting this message sporadically all of a sudden and I'm not sure how to fix it. [2017-04-07 20:09:32] main.CRITICAL: PDOException: SQLSTATE[HY000] [2002] Connection refused in /httpdocs/...
0
votes
1answer
24 views

Foreign Key Constraint

the following error as seen in the screenshot came up during the data migration from M1 to M2 using data migration tool. Please share your views as to how I go about eliminating this error with a ...
0
votes
0answers
21 views

I am trying to create datapatch but can't delete products

in the attribute Attribute "Manufacturer" we've several entries of the brand "LG", seems it was duplicated over and over during migration or import. I have to drop all instances of "LG" from the ...
0
votes
1answer
21 views

insert data to custome database

3 i created custom module how can I insert data from my form to database app/code/kamar/slider/etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
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] ...
4
votes
5answers
2k views

Error on login after update to 1.9.3

This is the error, can anyone help me with a solution to this? There has been an error processing your request SQLSTATE[42S22]: Column not found: 1054 Unknown column '...
1
vote
1answer
887 views

Relationship between catalog_product_entity and cataloginventory_stock_item

I am trying to join these 2 tables together to get all the attributes I need from the group of Product Entity tables and join them with the remaining quantity in stock from the Stock Item table. ...
0
votes
2answers
118 views

Admin Details in Backend in Magento 2

I have created admin grid and associated UI form. If I add a new item, the current (first)admin name who added the item should save in DB. That (first)admin name would not be change. But if the second ...
0
votes
1answer
870 views

how to import .csv file in defined table in command line?

I need to import.csv file throught windwos command line terminal in defined table. I trying this command : C:\xampp\mysql\bin\mysql -u root -p dbname dbtablename < C:\xampp\htdocs\site\csvfolder\...
0
votes
1answer
14 views

Can't connect to database inside local container

I have my magento installation and a mysql server running in two local containers and I can successfully connect to mysql from magento's container using mysql -u root -p -h <mysql_container_ip> ...
0
votes
2answers
20 views

Get all product descriptions and then update it

i want to get the description of all products in the magento store for all stores. After that i want to change something in the description and update that description in the database. Is this ...
0
votes
1answer
28 views

Magento2 write updated query using connection & Zend format

I am trying to add below SQL query in the form of Zend format using Magento connection object Can you please let me know the syntax of how to follow... update eav_attribute_set set attribute_set_name ...
1
vote
1answer
44 views

Migrating custom tables from M1

Data Migration Tool was used to migrate our Magento store from 1.9.2.2 to Magento 2.3.3 successfully. Upon inspection of the Magento 2 DB, I found out the custom tables weren't migrated which are 6 of ...
2
votes
3answers
2k views
0
votes
2answers
856 views

Get list of disabled products in Magento 2 with SQL query?

How can I get a list of disabled products in magento 2 using sql query?
1
vote
1answer
1k views

Magento - correct configuration of my.cnf

I'm trying to tweak my MySQL config on my Magento 1.9 install, without Full Page Cache installed on the server it run's really slow and I'm pretty sure its something to do with the MySQL Config. ...
1
vote
1answer
41 views

main.CRITICAL: Table “catalogrule_product_replica” does not exist Magento 2

I have been getting this in my logs and phpmyadmin main.CRITICAL: Table "catalogrule_product_replica" does not exist when I try to run these 2 indexes they are failing php bin/magento indexer:...
0
votes
0answers
24 views

How to save category options in Magento 2?

When I save options in the category page, they are not save! Look here, if I activate "full-width layout" then click save... I refresh the page and... it's not saved! Any Idea on this?
0
votes
1answer
37 views

Magento Upgrade 2.2.10 to 2.3.3 Getting Integrity constraint violation php bin/magento setup:upgrade

I have upgraded from Magento2.2.10 to Magento2.3.3 after running php bin/magento setup:upgrade I got this error SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a ...
1
vote
1answer
674 views

SQLSTATE[42000]: Syntax error or access violation: 1064 in magento 2.2.5

I have deleted old theme column in database table "theme". after that i am getting error on catalog view page and product view like this exception(s): Exception #0 (Zend_Db_Statement_Exception): ...
0
votes
2answers
96 views

Error running the `setup:di:compile` command Magento 2.3.0

Run:: /opt/plesk/php/7.2/bin/php -dmemory_limit=3G bin/magento setup:di:compile Error screenshot:: Any one can help me
1
vote
2answers
107 views

How can I update all products names via sql query in magento2?

Hi I have a list of sku's of all products at my store , I want to update all the names of products I have on store via sql query with respect to it's sku . There is a table name : ...
2
votes
1answer
23 views

Where to Learn magento 2 Advance development?

I want to take Magento 2 associate exam is there any preferred way that can help me to clear that exam, If yes please provide me your answers on understanding the magento core structure to clear that ...
0
votes
1answer
188 views

Undefined class constant 'PDO::MYSQL_ATTR_SSL_KEY' in/magento/setup/src/Magento/Setup/Model/ConfigOptionsList.php:179 in magento localhost

Ater execute any command getting this error Operating system :- Mint ubuntu Php version :- 7.2 Magento :- 2.3.4
0
votes
3answers
759 views

Billing name order in billing_name column in sales_flat_order_grid table

Can someone please tell me when a record is pushed into the "sales_flat_order_grid" table? How can I switch first name and last name in "billing_name" column of this table?

1
2 3 4 5
67