扩展一台mysql-5.6.40

1.打包/usr/local的文件

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

2.推送文件到远端机器

scp mysql.tar root@10.0.0.52:/usr/local/

scp /etc/profile /etc/my.cnf root@10.0.0.52:/etc/

scp /etc/init.d/mysqld root@10.0.0.52:/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

posted @ 2018-11-20 20:49  只许澎湃不许爱  阅读(138)  评论(0编辑  收藏  举报