扩展一台mysql-5.6.40

1.打包/usr/local的文件

tar cf /root/mysql.tar mysql-5.6.40/

2.推送文件到远端机器

scp mysql.tar [email protected]:/usr/local/

scp /etc/profile /etc/my.cnf [email protected]:/etc/

scp /etc/init.d/mysqld [email protected]:/etc/init.d/

3.远端机器操作

tar xf mysql.tar

groupadd mysql

useradd -r -g mysql -s /bin/false mysql

chown -R mysql.mysql mysql-5.6.40/

ln -s /usr/local/mysql-5.6.40/ /usr/local/mysql

. /etc/profile

/etc/init.d/mysqld start

4.登录

mysql

猜你喜欢

转载自www.cnblogs.com/fangdecheng/p/9991478.html