MySQL

MariaDB is a fork of the MySQL database management system. It was created as a community-driven alternative to MySQL, after concerns arose over its acquisition by Oracle Corporation.

MySQL Configuration Settings

MySQL Configuration settings are located at: /etc/mysql/my.cnf

If MariaDB is installed, the my.cnf file likely references: /etc/mysql/mariadb.conf.d/50-server.cnf

MySQL Memory Configuration

To increase the amount of memory available to MySQL on Linux, you can use the –innodb_buffer_pool_size option in the MySQL configuration file (e.g. /etc/my.cnf or /etc/mysql/mariadb.conf.d/50-server.cnf) and then restart the MySQL server to apply the change.

innodb_buffer_pool_size=256M

MySQL Tuner

MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability.

To install: sudo apt-get install mysqltuner

To run: sudo mysqltuner

MariaDB [(none)]> SHOW VARIABLES;

MariaDB [(none)]> select information_schema.system_variables.variable_name, information_schema.system_variables.default_value, global_variables.variable_value from information_schema.system_variables,information_schema.global_variables where system_variables.variable_name=global_variables.variable_name and system_variables.default_value <> global_variables.variable_value and system_variables.default_value <> 0;

Category : Knowledge Base