Ubuntu 14.04 added MySQL 5.6 to the official repository but it turns out installing it on anything less than 1GB RAM is pretty difficult.
It is necessary to disable service startup after an install to prevent apt-get from treating it as a install failure.
Create the file /usr/sbin/policy-rc.d and paste the following:
#!/bin/sh
exit 101
Make sure it’s executeable:
sudo chmod +x /usr/sbin/policy-rc.d
Pretty straight forward:
sudo apt-get install mysql-server-5.6
Change /etc/mysql/my.cnf to the following values or add them if they do not exist:
# /etc/my.cnf:
innodb_buffer_pool_size=5M
innodb_log_buffer_size=256K
query_cache_size=0
max_connections=10
key_buffer_size=8
thread_cache_size=0
host_cache_size=0
innodb_ft_cache_size=1600000
innodb_ft_total_cache_size=32000000# per thread or per operation settings
thread_stack=131072
sort_buffer_size=32K
read_buffer_size=8200
read_rnd_buffer_size=8200
max_heap_table_size=16K
tmp_table_size=1K
bulk_insert_buffer_size=0
join_buffer_size=128
net_buffer_length=1K
innodb_sort_buffer_size=64K#settings that relate to the binary log (if enabled)
binlog_cache_size=4K
binlog_stmt_cache_size=4K
Although the above allows MySQL 5.6 to be installed on a lower resource server, the above only allows an insall run to be made but I still encountered Out Of Memory (OOM) exceptions over time and also it was unstable (about 1-2 minutes of timeouts). The above just proves it can be installed but it won’t run as well as 5.5.
Configuring MySQL to use minimal memory
apt-get install ssh without starting?