Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Method of adding mysql to environment variables

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the method of adding mysql to the environment variable. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Add mysql to the environment variable: 1, open the / etc/profile configuration file; 2, add the configuration [export PATH=/opt/lampp/bin:$PATH]; 3, execute the [source / etc/profile] command to make the configuration effective.

Background:

In the self-installed lamp environment, when using mysql, you must specify a path to enter the database, which is too troublesome. We can solve this problem by adding mysql to the environment variable (mysql execution path / opt/lampp/bin).

Specific methods:

1. First open the / etc/profile file and add the following command at the end of the file:

Export PATH=/opt/lampp/bin:$PATH

2. Execute the command source / etc/profile to make the configuration effective.

3. After the execution is completed, we can log in to the database through the mysqsl-u root-p command under any path.

The method of adding mysql to the environment variable is shared here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report