MySQL

Last edit

Summary: doc a bit

Changed:

< Config is in
< /etc/mysql/conf.d/mysql.cnf
< and possibly
< /etc/systemd/system/mariadb.service.d/local.conf
< ... after you change the second file

to

> Config files:
> * THIS IS THE REAL ONE:
/etc/mysql/conf.d/mysql.cnf
> * /etc/mysql/my.cnf <-- all this does is include everything in /etc/mysql/conf.d/
> *
/etc/systemd/system/mariadb.service.d/local.conf is automatically generated?
> * the defaults, I think, are in /etc/alternatives/my.cnf

> ... after you change THE REAL ONE

Changed:

< * wget https://github.com/major/MySQLTuner-perl/tarball/master
< * tar xf master
< * cd major-MySQLTuner
-perl-993bc18/
< ./mysqltuner
.pl

to

> wget https://raw.githubusercontent.com/BMDan/tuning-primer.sh/main/tuning-primer.sh
> chmod u+x that
> then run it


Data is in /var/lib/mysql

Config files:

... after you change THE REAL ONE

 systemctl daemon-reload

... and then for either:

 systemctl restart mariadb

Tuning code wget https://raw.githubusercontent.com/BMDan/tuning-primer.sh/main/tuning-primer.sh chmod u+x that then run it

Status:

 systemctl status mariadb

See log:

 journalctl -u mariadb.service

2023-01-27

add

 bind-address=127.0.0.1 # to prevent connections from outside of the machine
 ... and change logging to "local1" 

2021-05-30

Upgrade from 10.1 to 10.3

Following directions from https://mariadb.com/docs/deploy/upgrade-community-server-cs103-debian9/

  create /data/backup/preupgrade_backup
  mariabackup --backup -uroot --target-dir=/data/backup/preupgrade_backup
  mariabackup --prepare --target-dir=/data/backup/preupgrade_backup

apt remove

And then.

2010-03

cswmysql5 startup file, /etc/opt/csw/init.d/cswmysql5: change

 MYSQL_VAR=/var/opt/csw/mysql5

to

 MYSQL_VAR=/local/mysql

2008-12

installing Perl 5.8.9, to hook up mysql, to cope with

 gcc: language strconst not recognized
 gcc: language strconst not recognized

edit the Makefile and remove -xstrconst and -mt