Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

How To Install MariaDB instead MySQL


100%

Recommended Posts

  • Administrator

What makes MariaDB a preferable option over MySQL?

MariaDB is a fork of MySQL and is fully compatible with it. It is predicted that MariaDB will replace Oracle MySQL Server as the preferred relational database management system.

MariaDB offers more features for improving performance and ensuring data integrity. One such feature is the Aria storage engine, which is an upgrade from the old MyISAM storage engine used on Metin2 Private servers. The old storage engine has some bugs and lacks ACID compliance like InnoDB. The fork XtraDB is an upgraded version of InnoDB that is used on MariaDB and Percona. If you cannot or do not want to convert your tables from MyISAM to InnoDB or XtraDB, Aria is a similar storage engine that you can use.

Here are the steps to install MariaDB on FreeBSD:

To begin, you need to remove the old MySQL server installation. Follow these steps:

  1. Create a security backup of your MySQL data directory by navigating to cd /var/db and using the command tar -cvJf mysql.tar.xz mysql.
  2. Create a backup of your application databases (Metin2, website, etc.) using the CLI utility mysqldump or GUI with Navicat.
  3. Stop the MySQL server by using the command service mysql-server stop.
  4. Remove the MySQL directory using the command rm -rf /var/db/mysql.
  5. Find the MySQL version by using the command mysql --version.
  6. Deinstall MySQL from ports using the command cd /usr/ports/databases/mysqlxx-server && make deinstall clean && cd /usr/ports/databases/mysqlxx-client && make deinstall clean, where xx is the version found in the previous step.

Now, you can install MariaDB by following these steps:

  1. Update your ports tree using the command portsnap fetch update.
  2. Install MariaDB using the command cd /usr/ports/databases/mariadb101-server && make install clean.
  3. If the MySQL service is not present, enable it by using the command echo "mysql_enable=YES" >> /etc/rc.conf.
  4. Start the MySQL server by using the command service mysql-server start.
  5. Import your application databases (Metin2, website, etc.) from the dump. Do not import from the datafile.

If you use Navicat, remember to create a new connection for MariaDB instead of MySQL.

To ensure better performance and data security, it is recommended that you convert all your tables to a new storage engine. You can choose a different storage engine for each table. Aria (new MyISAM) or XtraDB (new InnoDB) are suggested choices.

There are two ways to convert from one storage engine to another:

  1. Via GUI like Navicat (one table at a time). Right-click on the table -> Design Table->Options->Engine. Change and save.
  2. Via query: ALTER TABLE <table_name> ENGINE=<engine>;

This solution does not exclude the need for database backups. Schedule regular backups of your application databases from the dump. Use the mysqldump utility. For added safety, also create a datafile backup of the entire MySQL data directory (/var/db/mysql). This is for emergency restore of all MySQL if the dump import does not work. Only use datafile restore for the entire MySQL directory if there are no other solutions with dump.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...