时间:2021-07-01 10:21:17 帮助过:8人阅读
useradd mysql -s /sbin/nologin -M
cd /home/tools #存放mysql-5.5.49-linux2.6-x86_64.tar.gz
tar xf mysql-5.5.49-linux2.6-x86_64.tar.gz
mv mysql-5.5.49-linux2.6-x86_64 /application/mysql-5.5.49
ln -s /application/mysql-5.5.49 /application/mysql
cd /application/mysql
chown -R mysql.mysql /application/mysql/
./scripts/mysql_install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysql
/bin/cp support-files/my-small.cnf /etc/my.cnf(忽略提示)
cp support-files/mysql.server /etc/init.d/mysqld
sed -i ‘s#/usr/local/mysql#/application/mysql#g‘ /application/mysql/bin/mysqld_safe /etc/init.d/mysqld
/etc/init.d/mysqld start
echo ‘export PATH=/application/mysql/bin:$PATH‘>>/etc/profile
source /etc/profile
systemctl enable mysqld
mysqladmin -u root password ‘workjob‘ #更改mysql的登录密码,默认无登录密码
mysql -u root -p
mysql 的安装
标签:ble rpm安装 source mys 依赖 useradd linu mysql 依赖关系