Difference between revisions of "MariaDB (10.3)"

From Hexwiki
Jump to navigation Jump to search
Line 23: Line 23:
  
 
  rm /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile1
 
  rm /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile1
 +
 +
cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/99-server.cnf
 +
 +
To make your override file.
  
 
== max_allowed_packet ==
 
== max_allowed_packet ==
Line 51: Line 55:
  
  
== /etc/mysql/mariadb.conf.d/99-mariadb-server-override.cnf ==
+
== /etc/mysql/mariadb.conf.d/99-server.cnf ==
  
  

Revision as of 08:06, 13 July 2020

It may have taken awhile but here we are.

Buster at least includes mysqltuner, which is a useful guide program to watch for issues.

After installing mariadb be sure to

systemctl stop mariadb
chown mysql:mysql /innodb/
chmod 0750 /innodb
usermod -a -G hugepager mysql

And either

mv /var/lib/mysql/ibdata1 /innodb/

or remove it entirely if you are on a virgin installation.

Replace /innodb/ or ignore as necessary.

If you are changing the size of the ib_logfiles, you will want to first remove them:

rm /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile1
cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/99-server.cnf

To make your override file.

max_allowed_packet

Add

max_allowed_packet        = 32M 

Or whatever you need to all relevant files. If you end up running extremely large queries you may need to increase this. I mostly set it as a note to increase it later, as necessary. 32MB is already the default in some instances.

To [client] in /etc/mysql/mariadb.conf.d/50-client.cnf

To [mysql] and [mysqldump] in /etc/mysql/mariadb.conf.d/50-mysql-clients.cnf

The legacy mysql configuration files look like so:

/etc/mysql/conf.d/mysqldump.cnf

[mysqldump]
quick
quote-names
max_allowed_packet      = 32M

/etc/mysql/conf.d/mysqldump.cnf

[mysql]
max_allowed_packet        = 32M


/etc/mysql/mariadb.conf.d/99-server.cnf