Ansible实用案例之批量重装mysql
2017-08-21 00:14
288 查看
ansible all -m command -a "service mysqld stop"
ansible all -m file -a "dest=/home/mysql state=absent"
ansible all -m file -a "dest=/home/mysql_ex state=absent"
ansible all -m file -a "dest=/home/mysql state=directory"
ansible all -m file -a "dest=/home/mysql/data state=directory"
ansible all -m file -a "dest=/home/mysql/log state=directory"
ansible all -m command -a "chown mysql: -R /home/mysql/"
ansible all -m command -a "mysql_install_db --datadir=/home/mysql/data/ --user=mysql"
ansible all -m command -a "service mysqld start"
ansible all -m command -a "cat /root/.mysql_secret"
ansible all -m file -a "dest=/home/mysql state=absent"
ansible all -m file -a "dest=/home/mysql_ex state=absent"
ansible all -m file -a "dest=/home/mysql state=directory"
ansible all -m file -a "dest=/home/mysql/data state=directory"
ansible all -m file -a "dest=/home/mysql/log state=directory"
ansible all -m command -a "chown mysql: -R /home/mysql/"
ansible all -m command -a "mysql_install_db --datadir=/home/mysql/data/ --user=mysql"
ansible all -m command -a "service mysqld start"
ansible all -m command -a "cat /root/.mysql_secret"
相关文章推荐
- PHP 命令行模式实战之cli+mysql 模拟队列批量发送邮件(在Linux环境下PHP 异步执行脚本发送事件通知消息实际案例)
- 基于jenkins结合svn、ansible、shell和mysql版本迁移实现多服务器批量发布 推荐
- MySQL两种批量插入的实现案例
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- mysql存储过程使用CURSOR操作多列数据实用案例
- ansible-playbook实战之批量安装mysql
- ansible 批量推送 ansible_ssh_pass + ansible_sudo_pass+ become 使用案例
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- ansible-playbook实战之批量部署mysql主从同步
- MySQL的服务的安装、卸载与重装问题
- MySQL实用语句大全
- 存储过程 mysql 案例
- 关于批量插入数据之我见(100万级别的数据,mysql) (转)
- 使用mysql 自带的语句构建 多个更新条件 批量更新
- Mysql开发使用实用笔记
- 11级_Java_曹建波 04.07 jQuery easyUI tree +struts2+hibernate +mysql 实现 三级联动的案例
- MySQL重装出错解决方法