Change the storage engine on MariaDB / MySQL

Windows Articles

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...
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 enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...
x