Перейти к содержанию
Форум поддержки пользователей VamShop

Как SQL запросом поменять движок таблиц с MyISAM на InnoDB (либо наоборот)?!


support

Рекомендуемые сообщения

Зайдите в phpMyAdmin, в закладке SQL выполните код:

SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;

Сверху не забудьте поменять name_of_your_db на название Вашей базы.

phpMyAdmin вернёт код, скопируйте весь выведенный код и снова выполните его в SQL закладке.

Код будет примерно такой:

ALTER TABLE `specification_values_description` ENGINE=InnoDB;
ALTER TABLE `specification_values` ENGINE=InnoDB;
ALTER TABLE `specification_url` ENGINE=InnoDB;
ALTER TABLE `specification_groups_to_categories` ENGINE=InnoDB;
ALTER TABLE `specification_groups` ENGINE=InnoDB;
ALTER TABLE `specification_filters_statistics_agregate` ENGINE=InnoDB;
ALTER TABLE `specification_filters_statistics` ENGINE=InnoDB;
ALTER TABLE `specification_filters_description` ENGINE=InnoDB;
ALTER TABLE `specification_filters` ENGINE=InnoDB;
ALTER TABLE `specification_description` ENGINE=InnoDB;
ALTER TABLE `specifications` ENGINE=InnoDB;
ALTER TABLE `special_product` ENGINE=InnoDB;
ALTER TABLE `special_manufacturer` ENGINE=InnoDB;
ALTER TABLE `special_category` ENGINE=InnoDB;
ALTER TABLE `specials` ENGINE=InnoDB;
ALTER TABLE `site_reviews_description` ENGINE=InnoDB;
ALTER TABLE `site_reviews` ENGINE=InnoDB;
ALTER TABLE `shipping_status` ENGINE=InnoDB;
ALTER TABLE `ship2pay` ENGINE=InnoDB;
ALTER TABLE `sessions` ENGINE=InnoDB;
ALTER TABLE `scart` ENGINE=InnoDB;
ALTER TABLE `reviews_images` ENGINE=InnoDB;
ALTER TABLE `reviews_description` ENGINE=InnoDB;
ALTER TABLE `reviews` ENGINE=InnoDB;
ALTER TABLE `product_labels` ENGINE=InnoDB;
ALTER TABLE `products_xsell_grp_name` ENGINE=InnoDB;
ALTER TABLE `products_xsell` ENGINE=InnoDB;
ALTER TABLE `products_vpe` ENGINE=InnoDB;
ALTER TABLE `products_to_products_extra_fields` ENGINE=InnoDB;
ALTER TABLE `products_to_categories` ENGINE=InnoDB;
ALTER TABLE `products_specifications` ENGINE=InnoDB;
ALTER TABLE `products_pins` ENGINE=InnoDB;
ALTER TABLE `products_options_values_to_products_options` ENGINE=InnoDB;
ALTER TABLE `products_options_values` ENGINE=InnoDB;
ALTER TABLE `products_options` ENGINE=InnoDB;
ALTER TABLE `products_notifications` ENGINE=InnoDB;
ALTER TABLE `products_images` ENGINE=InnoDB;
ALTER TABLE `products_graduated_prices` ENGINE=InnoDB;
ALTER TABLE `products_extra_fields` ENGINE=InnoDB;
ALTER TABLE `products_description` ENGINE=InnoDB;
ALTER TABLE `products_content` ENGINE=InnoDB;
ALTER TABLE `products_bundles` ENGINE=InnoDB;
ALTER TABLE `products_attributes_download` ENGINE=InnoDB;
ALTER TABLE `products_attributes` ENGINE=InnoDB;
ALTER TABLE `products` ENGINE=InnoDB;
ALTER TABLE `persons` ENGINE=InnoDB;
ALTER TABLE `personal_offers_by_customers_status_3` ENGINE=InnoDB;
ALTER TABLE `personal_offers_by_customers_status_2` ENGINE=InnoDB;
ALTER TABLE `personal_offers_by_customers_status_1` ENGINE=InnoDB;
ALTER TABLE `personal_offers_by_customers_status_0` ENGINE=InnoDB;
ALTER TABLE `payment_qenta` ENGINE=InnoDB;
ALTER TABLE `orders_total` ENGINE=InnoDB;
ALTER TABLE `orders_status_history` ENGINE=InnoDB;
ALTER TABLE `orders_status` ENGINE=InnoDB;
ALTER TABLE `orders_recalculate` ENGINE=InnoDB;
ALTER TABLE `orders_products_download` ENGINE=InnoDB;
ALTER TABLE `orders_products_attributes` ENGINE=InnoDB;
ALTER TABLE `orders_products` ENGINE=InnoDB;
ALTER TABLE `orders_log` ENGINE=InnoDB;
ALTER TABLE `orders` ENGINE=InnoDB;
ALTER TABLE `newsletter_recipients` ENGINE=InnoDB;
ALTER TABLE `newsletters_history` ENGINE=InnoDB;
ALTER TABLE `newsletters` ENGINE=InnoDB;
ALTER TABLE `module_newsletter` ENGINE=InnoDB;
ALTER TABLE `media_content` ENGINE=InnoDB;
ALTER TABLE `markers_geocod` ENGINE=InnoDB;
ALTER TABLE `manufacturers_info` ENGINE=InnoDB;
ALTER TABLE `manufacturers` ENGINE=InnoDB;
ALTER TABLE `latest_news_to_products` ENGINE=InnoDB;
ALTER TABLE `latest_news_to_categories` ENGINE=InnoDB;
ALTER TABLE `latest_news` ENGINE=InnoDB;
ALTER TABLE `languages` ENGINE=InnoDB;
ALTER TABLE `geo_zones` ENGINE=InnoDB;
ALTER TABLE `featured` ENGINE=InnoDB;
ALTER TABLE `faq_to_products` ENGINE=InnoDB;
ALTER TABLE `faq_to_categories` ENGINE=InnoDB;
ALTER TABLE `faq1` ENGINE=InnoDB;
ALTER TABLE `faq` ENGINE=InnoDB;
ALTER TABLE `extra_fields_info` ENGINE=InnoDB;
ALTER TABLE `extra_fields` ENGINE=InnoDB;
ALTER TABLE `database_version` ENGINE=InnoDB;
ALTER TABLE `customers_wishlist_attributes` ENGINE=InnoDB;
ALTER TABLE `customers_wishlist` ENGINE=InnoDB;
ALTER TABLE `customers_to_manufacturers_discount` ENGINE=InnoDB;
ALTER TABLE `customers_to_extra_fields` ENGINE=InnoDB;
ALTER TABLE `customers_status_to_manufacturers_discount` ENGINE=InnoDB;
ALTER TABLE `customers_status_to_categories_discount` ENGINE=InnoDB;
ALTER TABLE `customers_status_orders_status` ENGINE=InnoDB;
ALTER TABLE `customers_status_history` ENGINE=InnoDB;
ALTER TABLE `customers_status` ENGINE=InnoDB;
ALTER TABLE `customers_memo` ENGINE=InnoDB;
ALTER TABLE `customers_ip` ENGINE=InnoDB;
ALTER TABLE `customers_info` ENGINE=InnoDB;
ALTER TABLE `customers_basket_attributes` ENGINE=InnoDB;
ALTER TABLE `customers_basket` ENGINE=InnoDB;
ALTER TABLE `customers` ENGINE=InnoDB;
ALTER TABLE `currencies` ENGINE=InnoDB;
ALTER TABLE `coupon_redeem_track` ENGINE=InnoDB;
ALTER TABLE `coupon_gv_queue` ENGINE=InnoDB;
ALTER TABLE `coupon_gv_customer` ENGINE=InnoDB;
ALTER TABLE `coupon_email_track` ENGINE=InnoDB;
ALTER TABLE `coupons_description` ENGINE=InnoDB;
ALTER TABLE `coupons` ENGINE=InnoDB;
ALTER TABLE `countries` ENGINE=InnoDB;
ALTER TABLE `counter_history` ENGINE=InnoDB;
ALTER TABLE `counter` ENGINE=InnoDB;
ALTER TABLE `content_manager` ENGINE=InnoDB;
ALTER TABLE `configuration_group` ENGINE=InnoDB;
ALTER TABLE `configuration` ENGINE=InnoDB;
ALTER TABLE `company_reviews_description` ENGINE=InnoDB;
ALTER TABLE `company_reviews` ENGINE=InnoDB;
ALTER TABLE `companies` ENGINE=InnoDB;
ALTER TABLE `cm_file_flags` ENGINE=InnoDB;
ALTER TABLE `cip_depend` ENGINE=InnoDB;
ALTER TABLE `cip` ENGINE=InnoDB;
ALTER TABLE `categories_description` ENGINE=InnoDB;
ALTER TABLE `categories` ENGINE=InnoDB;
ALTER TABLE `card_blacklist` ENGINE=InnoDB;
ALTER TABLE `campaigns_ip` ENGINE=InnoDB;
ALTER TABLE `campaigns` ENGINE=InnoDB;
ALTER TABLE `block` ENGINE=InnoDB;
ALTER TABLE `banners_history` ENGINE=InnoDB;
ALTER TABLE `banners` ENGINE=InnoDB;
ALTER TABLE `banktransfer` ENGINE=InnoDB;
ALTER TABLE `author_reviews_description` ENGINE=InnoDB;
ALTER TABLE `author_reviews` ENGINE=InnoDB;
ALTER TABLE `authors_info` ENGINE=InnoDB;
ALTER TABLE `authors` ENGINE=InnoDB;
ALTER TABLE `article_reviews_description` ENGINE=InnoDB;
ALTER TABLE `article_reviews` ENGINE=InnoDB;
ALTER TABLE `articles_xsell` ENGINE=InnoDB;
ALTER TABLE `articles_to_topics` ENGINE=InnoDB;
ALTER TABLE `articles_to_products` ENGINE=InnoDB;
ALTER TABLE `articles_to_categories` ENGINE=InnoDB;
ALTER TABLE `articles_description` ENGINE=InnoDB;
ALTER TABLE `articles` ENGINE=InnoDB;
ALTER TABLE `answer_templates` ENGINE=InnoDB;
ALTER TABLE `affiliate_sales` ENGINE=InnoDB;
ALTER TABLE `affiliate_payment_status_history` ENGINE=InnoDB;
ALTER TABLE `affiliate_payment_status` ENGINE=InnoDB;
ALTER TABLE `affiliate_payment` ENGINE=InnoDB;
ALTER TABLE `affiliate_clickthroughs` ENGINE=InnoDB;
ALTER TABLE `affiliate_banners_history` ENGINE=InnoDB;
ALTER TABLE `affiliate_banners` ENGINE=InnoDB;
ALTER TABLE `affiliate_affiliate` ENGINE=InnoDB;
ALTER TABLE `admin_access` ENGINE=InnoDB;
ALTER TABLE `address_format` ENGINE=InnoDB;
ALTER TABLE `address_book` ENGINE=InnoDB;

 

Ссылка на сообщение
Поделиться на другие сайты
×
×
  • Создать...