For script files, it is possible to execute, we do not have to install. So, but this script file does not have permission to execute, so we first give this script file the executable permission.
After you view the information for the file again.
There is already permission to execute.
When you run the script, be aware that the path must be selected correctly.
But the problem comes out, each time the script (command) to enter the path, too troublesome, and other commands, just enter the command name can be, do not enter the path. The answer is yes.
The way to solve the problem is simple, that is--environment variables work.
What are the environment variables for Linux to look at first?
In this environment variable, all the commands are saved. By default, the execution is performed by the command that is found here first. So our goal is to: put our stuff in here. There are a lot of environment variables, so let's put a simple one. For the last 2, choose one. Let's choose/root/bin this catalogue.
Go inside and see what's inside, hey--what's the matter, Wood has it. If the wood is there, then we'll set up a catalogue.
I built the directory, the inside is empty, we do not have to check.
Then, let's see if we can execute the command without a path.
The problem here, the basic solution, and you enter pt-, direct table, directly fill up your command, haha. It's much more convenient.
The road is here, and the next exploration is not much to say. We are all ape-men, this spirit is still there.
Finally attach the official website's help document, the English Austrian.
Http://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html
Download and use of MySQL Pt-query-digest