Mysql 5.5.20 的安装步骤:
思路:
1.
groupadd -r mysql
useradd -g mysql -s /sbin/nologin -M mysql
tar zvxf /root/mysql-5.5.20-linux2.6-x86_64.tar.gz
mkdir -p /usr/local/mysql
mv mysql-5.5.20-linux2.6-x86_64/* /usr/local/mysql
cd /usr/local/mysql/
chown -R mysql:mysql /usr/local/mysql/
mkdir -p /data/mysql/data
cd /data/mysql/data
chown -R mysql:mysql /data/mysql/data/
cd /usr/local/mysql/
/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/data/mysql/data --basedir=/usr/local/mysql
cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
vi /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/data/mysql/data
service mysqld start
标签:20,mysql5.5,步骤,data,usr,mysql,cd,local From: https://blog.51cto.com/u_16152230/6426999