-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea9a80f
commit 110b07e
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
#!/bin/bash | ||
|
||
## Slowlog file shared with ps docker container, to allow pmm-agent to read | ||
sudo chmod 777 -R /tmp/mysql/log | ||
|
||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "SET GLOBAL slow_query_log='ON';" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "INSTALL PLUGIN QUERY_RESPONSE_TIME_AUDIT SONAME 'query_response_time.so';" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "INSTALL PLUGIN QUERY_RESPONSE_TIME SONAME 'query_response_time.so';" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "INSTALL PLUGIN QUERY_RESPONSE_TIME_READ SONAME 'query_response_time.so';" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "INSTALL PLUGIN QUERY_RESPONSE_TIME_WRITE SONAME 'query_response_time.so';" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "SET GLOBAL query_response_time_stats=ON;" | ||
docker exec pmm-agent_mysql_8_0 mysql -h 127.0.0.1 -u root -p^O6VrIoC1@9b -e "GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm-agent'@'%';" |