Skip to content

Commit

Permalink
PMM-7 update db setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
yurkovychv committed Nov 18, 2024
1 parent ea9a80f commit 110b07e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testdata/db_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export PWD=$(pwd)

### Call PS5.7 Setup Scripts
bash -x ${PWD}/testdata/docker-db-setup-scripts/docker_ps_5_7.sh
bash -x ${PWD}/testdata/docker-db-setup-scripts/docker_ps_8_0.sh


### Call PS8.0 Setup Scripts
Expand Down
8 changes: 8 additions & 0 deletions testdata/docker-db-setup-scripts/docker_ps_8_0.sh
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'@'%';"

0 comments on commit 110b07e

Please sign in to comment.