environment variable collation of CentOS
MySQL used on CentOS always needs to execute commands in the installation directory, otherwise it will prompt command not fount. MySQL installation directory for/usr/local/mysql, now to collate the environment variables under CentOS.
Method one. Direct Run command Exprot path= $PATH:/usr/local/mysql/bin
Using this method is only valid for the current session, that is, when the system is logged out or logged off, it becomes invalid.
Method Two. Execute VI ~/.bash_profile Modify the path line in the file,
Modified to Path= $PATH:/$HOME/bin:/usr/local/mysql/bin
The modification takes effect for the user.
Method Three. Modify the/etc/profile file, which is permanently active after restarting the system
Export path= $PATH:/usr/local/mysql/bin
Executes the command source/etc/profile to make it effective, and you can see if the add succeeds through the Echo $PATH command.
environment variable collation of CentOS