当前位置:网站首页>Ansible MySQL installation case record
Ansible MySQL installation case record
2022-07-27 00:43:00 【Direct_】
List of articles
ansible install mysql Case record
This case reference Binary installation mysql
following yml There are still many imperfections in the document , Continue to modify later
---
- hosts: dbserver
remote_user: root
gather_facts: no
tasks:
- name: uninsert mariadb
shell: rpm -e --nodeps $(rpm -qa | grep mariadb)
- name: install packages
yum: name=libaio
- name: create group mysql
group: name=mysql gid=306
- name: create user mysql
user: name=mysql uid=306 group=mysql shell=/sbin/nologin system=yes
- name: copy tar to remote host and file mode
unarchive: src=/root/mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz dest=/usr/local/ owner=root group=root
- name: create linkfile /usr/local/mysql
file: src=/usr/local/mysql-5.7.38-linux-glibc2.12-x86_64 dest=/usr/local/mysql state=link
- name: mysql path
shell: echo 'export PATH=$PATH:/usr/local/mysql/bin' >> /etc/profile;source /etc/profile
- name: mkdir file
file: path=/usr/local/mysql/mysql_file owner=mysql group=mysql mode=0755 state=directory
- name: init mysql
shell: /usr/local/mysql/bin/mysqld --initialize-insecure --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql --log_error=/usr/local/mysql/mysql-file/mysql.log
- name: copy mysql.server to /etc/init.d
copy: src=/usr/local/mysql/support-files/mysql.server dest=/etc/init.d/mysql remote_src=yes
- name: copy my.cnf
copy: src=/root/my.cnf dest=/etc
- name: start mysql
service: name=mysql state=started
- name: change password # You will be prompted to change the password here mysqladmin Command not found , I don't know why
shell: mysqladmin -uroot password [email protected]
边栏推荐
- Complete review of parsing web pages
- 公司给了IP地址如何使用(详细版)
- Nacos installation and pit stepping
- [qt] attribute
- CDs simulation of minimum dominating set based on MATLAB
- 输入一串字母 将里面的元音输出希望各位大佬能给指导
- 用New,delete和用malloc,free申请,释放堆区空间
- 9_ Logistic regression
- Reduced dimension mean dot product matrix multiplicative norm probability normal distribution square loss
- Torch. correlation function
猜你喜欢

V-viewer use

Linux系统中安装Redis-7.0.4

MySQL associative table queries (reducing the number of queries)

7_主成分分析法(Principal Component Analysis)

【4.9 容斥原理详解】

放图仓库-2(函数图像)

6_梯度下降法(Gradient Descent)

JSCORE day_03(7.4)

10_ Evaluate classification

Leetcode high frequency question: the choice of the inn, how many options to choose accommodation, to ensure that you can find a coffee shop with a minimum consumption of no more than p yuan in the ev
随机推荐
C language shutdown applet
Draw impact function
Class and object notes I
Eight queens n Queens
Based on the theoretical principle and simulation results of MATLAB spherical decoding, compare 2norm spherical decoding, infinite norm spherical decoding, ML detection
MySQL associative table queries (reducing the number of queries)
Shang school software testing (1) software testing curriculum system, advantages, learning suggestions, understanding software, software testing and defects, software testing process, debugging and te
Matlab simulation of inverted pendulum control system based on qlearning reinforcement learning
【4.10 博弈论详解】
[4.2 approximations]
简单的素数程序 初学者 希望码龄高的大佬可以一下
DOM day_03(7.11) 事件冒泡机制、事件委托、待办事项、阻止默认事件、鼠标坐标、页面滚动事件、创建DOM元素、DOM封装操作
Oracle data guard service, process and protection mode
关于Redis问题的二三事
程序员必做50题
When the label begins with "IMS", why does logcat not print the log?
Arcgis和Cass实现断面展高程点
CDs simulation of minimum dominating set based on MATLAB
Fourier analysis (basic introduction)
c语言 比大小的多种描述,不要只拘泥于一种写法