http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html
- usuário root
sudo -i
- configuração de pré-configuração
apt-get install -y cmake build-essential libreadline6-dev libncurses5-dev
groupadd mysql
useradd -r -g mysql mysql
- compilação de origem (opção – https://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html )
mkdir -p /usr/local/src/mysql
cd /usr/local/src/mysql
wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz
tar xvfz mysql-5.6.10.tar.gz
cd mysql-5.6*
rm CMakeCache.txt
cmake
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.6.10
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock
-DSYSCONFDIR=/etc
.
make
make install
ln -s /usr/local/mysql-5.6.10 /usr/local/mysql
- configuração pós-instalação
cd /usr/local/mysql
cp ./support-files/my-default.cnf /etc/my.cnf
echo "character-set-server = utf8" >> /etc/my.cnf
echo "collation-server = utf8_general_ci" >> /etc/my.cnf
echo "character-set-client-handshake = false" >> /etc/my.cnf
chown -R root .
chgrp -R mysql .
chown -R mysql data
scripts/mysql_install_db --user=mysql
- corre
bin/mysqld_safe --user=mysql &
bin/mysqladmin -u root password 'new-password'
- shell init.d
cp support-files/mysql.server /etc/init.d/mysql.server
ln -s /etc/init.d/mysql.server /etc/rc2.d/S90mysql
- caminho
echo "export PATH=/usr/local/mysql/bin:$PATH" >> /etc/profile
- verifique my.cnf
se o /etc/mysql/my.cnf
arquivo existe,sudo /etc/mysql/my.cnf /etc/mysql/my.cnf.old