- mysql-5.6.19.tar.gz
一、MySQL下載及安裝
sudo wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.19.tar.gz
sudo gzip -d mysql-5.6.19.tar.gz
sudo tar xvf mysql-5.6.19.tar
sudo groupadd mysql
sudo useradd -g mysql mysql
cd mysql-5.6.19
sudo cmake -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_UNIX_ADDR=/var/tmp/mysql.sock -DSYSCONFDIR=/etc .
sudo make
sudo make install
二、權限修改或設定
cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo scripts/mysql_install_db --user=mysql
三、設定MySQL啟動時間
sudo su mysql
./bin/mysqld_safe start
cd /usr/local/mysql
sudo chown -R root .
sudo chown -R mysql data
sudo cp support-files/mysql.server /etc/init.d/mysql.server
sudo /etc/init.d/mysql.server start
sudo update-rc.d mysql.server defaults
sudo ln -s /usr/local/mysql/bin/* /usr/local/bin/
sudo mysql_secure_installation
參考鏈結:https://www.virgohacks.net/install-apache-2-4-mysql-5-6-php-5-5-source-ubuntu-14-04/
沒有留言:
張貼留言