Change the storage engine on MariaDB / MySQL

Windows Articles

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...

Install Virtualmin on CentOS 8

Hello, friends. In this post, you will learn how to install Virtualmin on CentOS 8. In addition to that, we will leave it ready...

Different ways to open File Explorer in Windows 10

Hello! Certainly the archive scan is an essential element when it comes to controlling the contents. It is even so important, that there are...

How to setup WireGuard VPN with ubuntu 20.04

Here, we will learn today how to configure WireGuard VPN with Ubuntu 20.04. Wireguard® is an amazingly straightforward yet quick and present-day VPN that...

How to Unlock the Bootloader on Xiaomi devices

Greetings dear readers, this time we bring you an easy guide on how to unlock the Bootloader on Xiaomi devices. The Bootloader in a...
angeloma
angeloma
Senior Writer and partner

This very short post deals with how to change the storage engine on MariaDB / MySQL. We will apply this to a specific table and you will also learn how to set it as default.

A storage engine is a small software module in MariaDB or MySQL to create, read, and update data from a database. Knowing which storage engine to use is a more important decision than it seems.

So, in MariaDB and MySQL the default engine is InnoDB. It is one of the used ones and even Oracle recommends using it for tables. Of course, this will depend on each situation and needs.

Other well-known storage engines are MyISAM, Memory, CSV, Merge, Archive, Federated, or Blackhole.

Change the storage engine on MariaDB / MySQL

The reality is that it is quite easy to change the storage engine of a specific table, the basic syntax in the MariaDB / MySQL shell is as follows:

> ALTER TABLE [table_name] ENGINE = [new_engine];

For example, if we want a table that is defined with the InnoDB engine to be passed to the MyISAM engine, the syntax would be as follows:

> ALTER TABLE osradar ENGINE = MyISAM;

And so you can quickly change the storage engine to a table. However, it should be noted that this process can have an impact on the data and mainly in the form of creation and recovery of them. So do it if necessary.

Changing the storage engine by default on MariaDB / MySQL

To change the default storage engine, edit the MariaDB or MySQL configuration file. This can vary according to the versions of the operating system or the same program. In the case of Ubuntu 20.04 and MariaDB it is:

:~$ sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

And change the next line:

default-storage-engine=InnoDB

A:

default-storage-engine=MyISAM

Save the changes and close the editor.

Conclusion

The MariaDB or MySQL storage engine is one of the key parts for database work on a professional level. So it is always advisable to know how to change it to a table or the whole system.

So, share this post and join our Telegram Channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...

Install Virtualmin on CentOS 8

Hello, friends. In this post, you will learn how to install Virtualmin on CentOS 8. In addition to that, we will leave it ready...

Different ways to open File Explorer in Windows 10

Hello! Certainly the archive scan is an essential element when it comes to controlling the contents. It is even so important, that there are...

How to setup WireGuard VPN with ubuntu 20.04

Here, we will learn today how to configure WireGuard VPN with Ubuntu 20.04. Wireguard® is an amazingly straightforward yet quick and present-day VPN that...

How to Unlock the Bootloader on Xiaomi devices

Greetings dear readers, this time we bring you an easy guide on how to unlock the Bootloader on Xiaomi devices. The Bootloader in a...
x