How does phpMyAdmin convert InnoDB data table type conversion to MyISAM default engine?

phpMyAdminHow to convert InnoDB data table type

Convert to MyISAM default engine?

It is recommended to convert InnoDB data tables to MyISAM data tables:

  • Combined with the characteristics of personal blogs, MyISAM is recommended for personal blog systems, because the main operations in blogs are reading and writing, and there are few chain operations.
  • SoChoosing the MyISAM engine makes your blog open and page more efficient than the InnoDB engine blog.
  • Of course, it's just a personal suggestion, and most bloggers choose carefully according to the actual situation.

Tips:in conversionMySQL databaseBefore the table, be sure to make a database backup ▼

Steps to manually change the data table type in the phpMyAdmin background

  • 1) Log in to phpMyAdmin database management;
  • 2) After logging in, click on the left columndatabase;
  • 3) Click on the left columnDatatables (non-MyISAM types);
  • 4) Click "Steps to follow" Tab;
  • 5) In the "Operation" page, select to change the "Database Storage" type to "MyISAM";
  • 6) Click "(I.e.", the conversion is successful.

SSH command to quickly convert to MyISAM database table type

Open SSHsoftwareConnected toLinuxserver, enter the following command▼

mysql -uroot -p
  • Enter the phpMyAdmin password to log in to SSH.
  • appear"mysql>"You can continue.
  • Enter in the following format, being case-sensitive and ;.
  • The database name and table name are all lowercase, and the rest of the commands are uppercase. If the last ; is not entered, the command will not take effect.
USE 数据库名;
SHOW TABLES;
ALTER TABLE 表名 ENGINE=MYISAM;

The first wp_commentmeta table converted in the figure below is displayed successfully, and then the table names can be converted one by one▼

How does phpMyAdmin convert InnoDB data table type conversion to MyISAM default engine?

  • enter SHOW TABLES;  After the command, the database table name is displayed.
  • Copy and modify the corresponding table name ALTER TABLE 表名 ENGINE=MYISAM; Convert to MyISAM database table type for quick operations (at least faster than manually changing the data table type in the phpMyAdmin background).
  • There are a total of 13 table names. After the conversion is completed, enter "exit"quit.

Make MyISAM the default engine

After the conversion is completed, it is recommended to close the InnoDB engine, and then set MyISAM to the futureMySQLthe default engine.

How to set default to use "Database Storage" type as "MyISAM"?

Chen WeiliangCWP Control PanelThe program is an example, and the operation steps are as follows:

1) Edit the /etc/my.cnf file and find the imported folder !includedir /etc/my.cnf.d

2) Go to the /etc/my.cnf.d folder

3) Open the server.cnf file

4) Find "default_storage_engine"

5) Add below "#default_storage_engine=InnoDB":

default_storage_engine = MYISAM

6) After saving, restart the MySQL service:

service mysqld restart

Or restart the Mariadb service:

systemctl restart mariadb

The method is very simple, just follow the operation, you can complete the modification, this tutorial is over!

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How does phpMyAdmin convert InnoDB data table type conversion to MyISAM default engine? , to help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-413.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top