How to add /usr/local/mysql/bin as a system variable
Method 1:
vim /etc/profile Add at the end
PATH=/usr/local/mysql/bin:$PATH
export PATH
If it’s the one just now The modification will take effect immediately. You need to execute the following code
[root@CentOS ~]# source /etc/profile
Method 2:
cd /etc/profile.d
vim mysql.sh
PATH=/usr/local/mysql/ bin:$PATH
export PATH
If the modification just now takes effect immediately, you need to execute the following code
[root@CentOS ~]#source /etc/profile.d/mysql.sh
More For related articles on three methods of permanently adding environment variables in Linux, please pay attention to the PHP Chinese website!