sudo apt-get update sudo apt-get install cmake build-essential libncurses5-dev
tar -xzvf mysql-5.7.10.tar.gz
cd mysql-5.7.10
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql
make
sudo make install
sudo mkdir -p /usr/local/mysql/data
sudo /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql sudo chmod +x /etc/init.d/mysql sudo update-rc.d mysql defaults sudo service mysql start
sudo /usr/local/mysql/bin/mysql_secure_installation
mysql -u root -p
SELECT version();
SHOW STATUS;
SHOW DATABASES;
本文链接:http://task.lmcjl.com/news/6914.html