--

MySql server
------------

Parametri za upgrade

## Raise to 128M for 2GB RAM, 256M for 4GB RAM and 512M for 8GB RAM
key_buffer                              = 64M

## Raise to 128M for 2GB RAM, 256M for 4GB RAM and 512M for 8GB RAM
# InnoDB buffer pool size in bytes. The primary value to adjust on a database server, 
# can be set up to 80% of the total memory in these environments
innodb_buffer_pool_size                 = 664M
#innodb_additional_mem_pool_size = 20M

## Misc Tunables (Don't touch these unless you know why you would want to touch these)##
max_allowed_packet                      = 16M
innodb_file_per_table

## Changing this setting requires you to stop MySQL, move the current logs out of the way, and then starting MySQL ##
innodb_log_file_size                    = 128M
#innodb_log_buffer_size = 8M
# Min = 2
#innodb_log_files_in_group = 1
#innodb_log_group_home_dir = /home/mysql

#innodb_flush_log_at_trx_commit = 1
innodb_flush_log_at_trx_commit = 2

# Number of I/O threads for writes
innodb_write_io_threads = 8
# Number of I/O threads for reads
innodb_read_io_threads = 8


Pregled trenutnih vrednosti

--
shell> mysqladmin variables
shell> mysqladmin extended-status
--
SHOW VARIABLES;
SHOW STATUS;
SHOW ENGINE INNODB STATUS


-------------------------------------------------------------------------------
Postopek nadgradnje

# Vnesi parametre v MySql config = Done
# Restartaj MySQL
## MySql v5.7 ali vec = ni drugih posebnosti
## MySql v5.5 - posebnost/opozorilo - ker se je spremenil param.: innodb_log_file_size
	* zaustavi MySql
	* pobrisi trenutne redo_log-e
	** cd /var/lib/mysql
	** rm ib_log*

	* startaj MySql
	** zna trajat malo vec cajta (sekund) prvic, da pripravi nove redo_log file


-------------------------------------------------------------------------------
Postopek ureditve InnoDB tabel

Navedeno velja za MySQL v5.5 in manj.
Ker se je spremenil parameter: innodb_file_per_table
.. dejansko je sedaj definiran, prej pa je manjkal v konfiguraciji.

Privzeto - brez parametra - MySql hrani InnoDB podatke v samo enem fizicnem file-u:
* /var/lib/mysql/ibdata1

Parameter: innodb_file_per_table
.. pa doloca, da se za vsako tabelo zgradi lastna datoteka.

Da se uredi stanje InnoDb podatkov/tabel je potrebno naredit export + import vseh baz.
To se mi zdi najbolj siguren/varen nacin, da se to uredi.

--