In Linux, you can use the "whereis" command to view the installation location of mysql. This command is used to find files that meet the conditions in a specific directory. You only need to enter "whereis mysql" in the terminal.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to check the mysql installation location in Linux
Since the software is installed in more than one place, let’s first check all the paths of the file installation (address ).
Here is mysql as an example. For example, I installed mysql, but I don’t know where the files are installed or in which folders. You can use the following command to view all file paths
Enter in the terminal:
whereis mysql
Enter, if you have installed mysql, the address of the file installation will be displayed, such as my display (the installation address may be different)
root@ubuntu:/# whereis mysql mysql: /usr/bin/mysql /usr/bin/X11/mysql /usr/local/mysql
2. Query the path of the running file (folder address)
If you only want to query the address of the running file, just use the following command (still use mysql as an example):
which mysql
Terminal display:
root@ubuntu:/# which mysql /usr/bin/mysql
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to check the installation location of mysql in linux. For more information, please follow other related articles on the PHP Chinese website!