In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Official document: https://docs.saltstack.com/en/2016.3/ref/returners/all/salt.returners.mysql.html#module-salt.returners.mysql
Mysql built it himself.
The first step is to create a database on the master machine
CREATE DATABASE `salt` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;USE `salt`; CREATE TABLE `jids` (`jid` varchar (255) NOT NULL, `load` mediumtext NOT NULL, UNIQUE KEY `jid` (`jid`) ENGINE=InnoDB DEFAULT CHARSET=utf8;CREATE INDEX jid ON jids (jid) USING BTREE CREATE TABLE `salt_ Secretns` (`fun` varchar (50) NOT NULL, `jid` varchar (25551) NOT NULL, `funn` mediumtext NOT NULL, `id`varchar (2555i) NOT NULL, `room`varchar (10) NOT NULL, `full_ ret` mediumtext NOT NULL, `alter_ time`TIMESTAMP DEFAULT CURRENT_TIMESTAMP, KEY `id` (`id`), KEY `jid` (`jid`), KEY `fun` (`fun`) ENGINE=InnoDB DEFAULT CHARSET=utf8 CREATE TABLE `salt_ events` (`id`BIGINT NOT NULL AUTO_INCREMENT, `tag` varchar) NOT NULL, `data`mediumtext NOT NULL, `alter_ time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `master_ id`varchar (`id`) NOT NULL,PRIMARY KEY (`id`), KEY `tag` (`tag`) ENGINE=InnoDB DEFAULT CHARSET=utf8; authorization: grant all on salt.* to salt@'%' identified by 'salt'
Master and Minion side:
Vim / etc/salt/minionmysql.host: '192.168.141.250' # the ip here writes master's ipmysql.user: 'salt'mysql.pass:' salt'mysql.db: 'salt'mysql.port: 3306 Save exit and restart the service / etc/init.d/salt-minion restart
We carry out an order:
Salt'* 'test.ping-- return mysql
We enter the mysql command line:
Mysqlshow databases;use salt;show tables;select * from salt_returns\ G The results are as follows: * * 1. Row * * fun: test.ping jid: 20170321234131569065 return: true id: web12.limingyu.com success: 1 full_ret: {"fun_args": [], "jid": "20170321234131569065", "return": true "retcode": 0, "success": true, "fun": "test.ping", "id": "web12.limingyu.com"} alter_time: 2017-03-21 23:41:32
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.