日期:2014-05-16 浏览次数:20754 次
groupadd mysql useradd -r -g mysql mysql cd /usr/local tar zxvf /path/to/mysql-VERSION-OS.tar.gz ln -s full-path-to-mysql-VERSION-OS mysql cd mysql chown -R mysql . chgrp -R mysql . scripts/mysql_install_db --user=mysql chown -R root . chown -R mysql data # Next command is optional cp support-files/my-medium.cnf /etc/my.cnf bin/mysqld_safe --user=mysql & # Next command is optional cp support-files/mysql.server /etc/init.d/mysql.server
tar -zxvf /path/to/mysql-VERSION-OS.tar.gz
cd mysql scripts/mysql_install_db --user=lyh
sudo apt-get install libaio1
./support-files/mysql.server start
./bin/mysqladmin -u root -h 127.0.0.1 -p password '123456'
export PATH=/home/lyh/softs/mysql/bin:$PATH >> ~/.bashrc
sudo cp support-files/mysql.server /etc/init.d/mysql.server
mv Download/mysql-VERSION-OS.tar.gz softs cd softs tar -zxvf mysql-VERSION-OS.tar.gz ln -s mysql-VERSION-OS mysql cd mysql scripts/mysql_install_db --user=lyh sudo apt-get install libaio1 (如有需要)
cd /usr/local sudo tar zxvf /path/to/mysql-VERSION-OS.tar.gz sudo ln -s mysql-VERSION-OS mysql cd mysql sudo chown -R lyh . sudo chgrp -R lyh . scripts/mysql_install_db --user=lyh sudo apt-get install libaio1 (如有需要)
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456'; mysql> flush privileges;