Last active
November 18, 2019 14:24
-
-
Save michaeljoy/ac94cb9543237e8b9d7d5720fbd88600 to your computer and use it in GitHub Desktop.
Revisions
-
michaeljoy revised this gist
Nov 17, 2019 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,19 @@ # # pt-heartbeat systemd service file for databasenamehere # [Unit] Description="pt-heartbeat" After=network-online.target syslog.target Wants=network-online.target [Install] WantedBy=multi-user.target [Service] Type=forking PIDFile=/var/run/pt-heartbeat-databasenamehere.pid ExecStart=/usr/bin/pt-heartbeat "--config=/etc/percona-toolkit/pt-heartbeat-databasenamehere.conf" "--defaults-file=/etc/percona-toolkit/my.cnf" "--update" StandardOutput=syslog StandardError=syslog SyslogIdentifier=pt-heartbeat Restart=on-abort -
Michael Joy renamed this gist
Jul 6, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Michael Joy renamed this gist
Jul 6, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Michael Joy created this gist
Jul 6, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ [mysql] host=localhost socket=/var/run/mysqld/mysqld.sock [client] host=localhost socket=/var/run/mysqld/mysqld.sock This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ utc replace daemonize pid=/var/run/pt-heartbeat-databasenamehere.pid socket=/var/run/mysqld/mysqld.sock database=databasenamehere table=heartbeat interval=0.01 user=insert_low_privilege_mysql_user_here password=insert_low_privilege_mysql_user_password_here This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # # pt-heartbeat-databasenamehere systemd service file # [Unit] Description="pt-heartbeat-databasenamehere" After=syslog.target mysql.service Requires=mysql.service [Install] WantedBy=multi-user.target [Service] Type=simple PIDFile=/var/run/pt-heartbeat-databasenamehere.pid ExecStart=/usr/bin/pt-heartbeat "--config=/etc/percona-toolkit/pt-heartbeat-databasenamehere.conf" "--defaults-file=/etc/percona-toolkit/my.cnf" "--update" StandardOutput=syslog StandardError=syslog SyslogIdentifier=pt-heartbeat-databasenamehere Restart=on-abort This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ -- Grants for 'pt_heartbeat'@'10.%' CREATE USER IF NOT EXISTS 'pt_heartbeat'@'10.%'; ALTER USER 'pt_heartbeat'@'10.%' IDENTIFIED WITH 'mysql_native_password' AS 'INSERTREALLYSECUREPASSWORDHERE' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT DELETE, INSERT, SELECT, UPDATE ON `databasenamehere`.`heartbeat` TO 'pt_heartbeat'@'10.%'; GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'pt_heartbeat'@'10.%'; -- Grants for 'pt_heartbeat'@'127.0.0.1' CREATE USER IF NOT EXISTS 'pt_heartbeat'@'127.0.0.1'; ALTER USER 'pt_heartbeat'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password' AS 'INSERTREALLYSECUREPASSWORDHERE' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT DELETE, INSERT, SELECT, UPDATE ON `databasenamehere`.`heartbeat` TO 'pt_heartbeat'@'127.0.0.1'; GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'pt_heartbeat'@'127.0.0.1'; -- Grants for 'pt_heartbeat'@'localhost' CREATE USER IF NOT EXISTS 'pt_heartbeat'@'localhost'; ALTER USER 'pt_heartbeat'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS 'INSERTREALLYSECUREPASSWORDHERE' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT DELETE, INSERT, SELECT, UPDATE ON `databasenamehere`.`heartbeat` TO 'pt_heartbeat'@'localhost'; GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'pt_heartbeat'@'localhost';