- Download build-tools
apt-get install build-essential cmake -y
- Configure the compiler
cmake \
-DWITH_BOOST=/usr/local/src/mysql-5.7.19/boost/boost_1_59_0 \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DMYSQL_UNIX_ADDR=/tmp/mysql57.sock \
-DMYSQL_DATADIR=/usr/local/mysql57/data \
-DSYSCONFDIR=/usr/local/mysql57/etc \
- Make Install
make install
- Create default database
mkdir /usr/local/mysql57/data
chown mysql:mysql /usr/local/mysql57/data
mkdir /var/run/mysql57
chown mysql:mysql /var/run/mysql57
./bin/mysqld --port=3307 --datadir=/usr/local/mysql57/data --socket=/var/run/mysql57/mysql57.sock --initialize
Note the password at: /var/log/mysql/error.log