Debug queries with mytop
mytop is an mysql tool written in Perl to look at the database queries during runtime. This is how to debug queries with mytop. Installation apt-get install mytop Usage mytop -u USERNAME -pPASSWORD -d DATABASE
mytop is an mysql tool written in Perl to look at the database queries during runtime. This is how to debug queries with mytop. Installation apt-get install mytop Usage mytop -u USERNAME -pPASSWORD -d DATABASE
$> mysql -u USEERNAME -p $> mysql> USE dbname3; # enter Database changed $> mysql> source ./relative_path_to_file.sql; # enter
To create a UTF-8 Database: CREATE DATABASE my_very_nice_db DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; For external access, have a look at MySQL – external Access.
There are conditional commands for MySQL too. IF/ELSE SELECT FieldA as A, FieldB as B, IF(FieldA = FieldB, ‘equal’, ‘not equal’) as condition, FROM table WHERE this LIKE that Or cascaded: SELECT FieldA as A, FieldB as B, IF(FieldA = FieldB,’FieldA is equal to FieldB’,IF(FieldC = FieldD,’FieldC is equal to FieldD’,’all false’)) as output, FROM […]
Move products to an another category UPDATE db220385_2.catalog_category_product SET category_id = 18 WHERE category_id = 19; Get all attribute option values The following example shows, how to get all available values for the attribute filter_stores SELECT ea.attribute_code, eao.option_id, eaov.store_id, eaov.value_id, eaov.value FROM eav_attribute AS ea INNER JOIN eav_attribute_option AS eao ON ea.attribute_id = eao.attribute_id INNER […]