Articles in this section

How to change the innodb_log_file_size setting in MariaDB

Plesk for Windows kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

How to change the innodb_log_file_size setting in MySQL/MariaDB?

Answer

For Plesk on Linux
  1. Connect to your Plesk server via SSH.
  2. Open the MySQL/MariaDB configuration file my.cnf in a text editor. In this example, we are using vi editor:
    • on CentOS/RHEL-based distributions:

      # vi /etc/my.cnf

    • on Debian/Ubuntu-based distributions:

      # vi /etc/mysql/my.cnf

  3. Under the [mysqld] section, change the innodb_log_file_size value according to your needs (the default value is 48M):

    Note: If the innodb_log_file_size directive does not exist in the file, add it manually under the [mysqld] section.

    CONFIG_TEXT: [mysqld]
    innodb_log_file_size=128M
    <...>

  4. Save the changes and close the file.
  5. Find MariaDB version:

    # mysql -V

    If MariaDB version is 10.5 or higher, move to step 6. If MariaDB version is 10.4 or lower, apply these additional steps:

    5.1. Stop the MySQL/MariaDB service:

    # systemctl stop mariadb && systemctl stop mysql

    5.2. Move the redo log files ib_logfile0 and ib_logfile1 to another directory. In this example, the files are moved to /root:

    # mv /var/lib/mysql/ib_log* /root

  6. Restart the MySQL/MariaDB service:

    # systemctl start mariadb && systemctl start mysql

For Plesk on Windows Server

 

In Plesk for Windows, there are two MariaDB instances with their own configuration:

  • Plesk SQL server for Plesk system databases (location %plesk_dir%MySQL\)
  • MariaDB (or MySQL) for customers' databases (location %plesk_dir%Databases\MySQL\)

 

Plesk SQL server
  1. Connect to your Plesk server via RDP.
  2. Open MariaDB configuration file my.ini in a text editor (paste the path below in Windows Explorer to open):

    C:\> %plesk_dir%MySQL\my.ini

  3. Under the [mysqld] section, change the innodb_log_file_size value according to your needs (the default value is 10M):

    CONFIG_TEXT: innodb_log_file_size=128M

  4. Save the changes and close the file.
  5. Restart the Plesk SQL Server service via Plesk Services Monitor or Windows Services.

 

MariaDB server
  1. Connect to your Plesk server via RDP.
  2. Open MariaDB configuration file my.ini in a text editor (paste the path below in Windows Explorer to open):

    C:\> %plesk_dir%Databases\MySQL\my.ini

  3. Under the [mysqld] section, change the innodb_log_file_size value according to your needs (the default value is 10M):

    CONFIG_TEXT: innodb_log_file_size=128M

  4. Save the changes and close the file.
  5. Restart the MariaDB service via Plesk Services Monitor or Windows Services.
Was this article helpful?

Comments

2 comments
Date Votes

Please sign in to leave a comment.