====== MySQL ======
* [[http://stackoverflow.com/questions/21190523/phpmysql-error-1273-1273-unknown-collation-utf8mb4-general-ci|Problems with utf8mb4]]
* [[https://dbahire.com/how-to-install-mysql-server-on-debian-stretch/|How to install MySQL Server on Debian Stretch]]
* [[https://superuser.com/questions/1209255/how-to-upgrade-mysql-from-5-5-to-5-7|How to upgrade Mysql from 5.5 to 5.7?]]
* [[https://dev.mysql.com/doc/refman/5.7/en/upgrading-strategies.html|MySQL Upgrade Strategies]]
* [[https://dev.mysql.com/doc/refman/5.5/en/performance-schema-quick-start.html|Performance Schema Quick Start]]
* [[https://dev.mysql.com/doc/refman/5.5/en/performance-schema-examples.html|Using the Performance Schema to Diagnose Problems]]
* [[https://stackoverflow.com/questions/33038753/how-to-optimize-left-join-query-on-large-table|How to Optimize Left Join Query on Large Table]]
* [[https://dev.mysql.com/doc/refman/5.5/en/storage-engine-setting.html|Setting the Storage Engine]]
* [[https://dev.mysql.com/doc/refman/5.6/en/bnl-bka-optimization.html|Block Nested-Loop and Batched Key Access Joins]]
* [[https://www.percona.com/blog/2014/01/24/mysql-server-memory-usage-2/|MySQL server memory usage troubleshooting tips]]
* [[https://www.percona.com/blog/2006/05/17/mysql-server-memory-usage/|MySQL Server Memory Usage]]
* [[https://dev.mysql.com/doc/refman/5.5/en/structured-system-variables.html|Structured System Variables]]
* [[http://www.mysqlab.net/knowledge/kb/detail/topic/performance/id/5114|How do I tune the MyISAM key buffer and InnoDB buffer pool in MySQL?]]
* [[https://haydenjames.io/mysql-query-cache-size-performance/|Avoid This When Tuning MySQL Query Cache for Performance]]
===== Upgrade MySQL version on Debian 7/8 =====
- Download the MySQL APT repository config tool (you can see more details and the latest version of the tool here: http://dev.mysql.com/downloads/repo/apt/)wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
- Install the MySQL APT repository config tooldpkg -i mysql-apt-config_0.8.9-1_all.deb
You will be asked to select product and version that you want to install. In the first step, select Server and next select either mysql-5.6 or mysql-5.7. Then click Apply.
- Update APTapt-get update
- Install the serverapt-get install mysql-server
- Set the data directory in /etc/mysql/mysql.conf.d/mysqld.cnf, restart the server and run the table upgrade utility/etc/init.d/mysql restart
mysql_upgrade -u -p
==== Links ====
* [[https://dev.mysql.com/downloads/repo/apt/|Download MySQL APT Repository]]
* [[https://www.debiantutorials.com/how-to-install-mysql-server-5-6-or-5-7/|How to install MySQL server 5.6 or 5.7]]
* [[https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-replacing|Replacing a Native Distribution of MySQL Using the MySQL APT Repository]]
===== Install MariaDB on Debian 7/8 =====
- Uninstall mysql withsudo apt-get remove --purge mysql\*
- Install APT repository sourcessudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian jessie main'
- Install MariaDB serversudo apt-get update
sudo apt-get install mariadb-server
- Install phpmyadmin and php5-mysql which got uninstalled when uninstalling mysqlapt-get install phpmyadmin
- Modify configuration file /etc/mysql/my.cnf and set path to data directory
- Restart server and run mysql-upgrade/etc/init.d/mysql restart
mysql-upgrade
- login to the server (command line or phpmyadmin) and set the password of user debian-sys-maint to the one stored in /etc/mysql/debian.cnf
- Install MySQLTunerwget https://github.com/major/MySQLTuner-perl/tarball/master
tar xf master
cd major-MySQLTuner-perl-993bc18/
./mysqltuner.pl
==== Links ====
* [[https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-101/|Changes & Improvements in MariaDB 10.1]]
* [[https://mariadb.com/kb/en/library/installing-mariadb-deb-files/|Installing MariaDB .deb Files]]
* [[https://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/|15 Useful MySQL/MariaDB Performance Tuning and Optimization Tips]]
* [[https://stackoverflow.com/questions/10861374/how-to-remove-mysql-completely-with-config-and-library-files|How to remove MySQL completely with config and library files?]]
* [[https://www.tecmint.com/install-mariadb-in-ubuntu-and-debian/|How to Install MariaDB 10 on Debian and Ubuntu]]
* [[https://www.tecmint.com/install-mariadb-in-debian/|Installing MariaDB 10.1 in Debian Jessie and Running Various MariaDB Queries]]
* [[https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html|10.4 Connection Character Sets and Collations]]
* [[https://dev.mysql.com/doc/refman/5.7/en/charset-applications.html|10.5 Configuring Application Character Set and Collation]]
* [[https://dev.mysql.com/doc/refman/5.5/en/storage-engine-setting.html|15.1 Setting the Storage Engine]]
* [[https://mariadb.com/kb/en/library/setting-character-sets-and-collations/|Setting Character Sets and Collations]]
* [[https://mariadb.com/kb/en/library/set-names/|SET NAMES]]
* [[https://github.com/WPN-XM/WPN-XM/issues/462|MariaDB default character set and collation should be UTF-8]]
* [[https://github.com/joomla/joomla-cms/issues/9062|MariaDB server version not returned correctly in libraries/joomla/database/driver/mysqli.php]]