I install percona-toolkit and create conf file like this:
[root@i-zryeyuku mysql]# cat /etc/percona-toolkit/pt-mysql-summary.conf
p=abcd1234
socket=/tmp/mysql1.sock
I can run pt-mysql-summary like this:
[root@test log]# pt-mysql-summary
mysql: [Warning] Using a password on the command line interface can be insecure.
Percona Toolkit MySQL Summary Report
System time | 2017-02-18 07:46:27 UTC (local TZ: CST +0800)
…
…
output like this:
[root@test conf]# env -i /usr/bin/pt-mysql-summary >/dev/null; echo EC: $?
2017_02_22_20_07_31 Cannot execute mysql. Check that it is in PATH.
EC: 1
i try add path like this,but not working
export PATH=/usr/bin:/usr/local/mysql/bin:$PATH
i try to use mysql commad connect mysql server is ok
[root@test ~]# mysql -uroot -p -S /tmp/mysql1.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 114962
Server version: 5.7.17-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
i run pt-mysql-summary get this error:
[root@test bin]# pt-mysql-summary
/usr/bin/pt-mysql-summary: line 552: mktemp: command not found
/usr/bin/pt-mysql-summary: line 26: date: command not found
Cannot make secure tmpdir
This host is provided by the cloud service,I guess they change something that we do not know,
There is no problem installing on the local virtual machine in the same way
you are right,systemd runs apps without environment variables.
I install use source code and saved it to a non-default directory.
I try the way like this:
ln -s /apps/mysql/bin/* /usr/bin/