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

How to see if linux has mysql installed

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

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to see whether linux has installed mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Check whether linux installs mysql: 1, open the terminal command window; 2, execute the command "service mysqld start" or "chkconfig-- list mysqld" command.

Operating environment of this article: linux5.9.8 system, mysql5.5, DELL G3 computer

How do you think linux has mysql installed?

Linux to see if MySQL is installed:

Yum install mysql

Yum-y install mysql-server

The daemon of 1meme MySQL is mysqld

If it is already installed:

[root@localhost ~] # service mysqld start starts MySQL: [OK]

If it is not installed:

[root@localhost ~] # service mysqld startmysqld: unrecognized service

You can see if your service has been added to linux.

[root@localhost ~] # chkconfig-- list mysqldmysqld 0: close 1: close 2: close 3: close 4: close 5: enable 6: close

Without installation:

[root@localhost] # chkconfig-- list mysqld

Error reading information in mysqld service, there is no file or directory

Once you start the service, you can check to see if the server is running

[root@localhost] # ps-el | grep mysqld4 S 0 1796 1 085 0-1513 wait? 00:00:00 mysqld_safe 4 S 27 1856 1796 0 78 0-34055 -? 00:00:00 mysqld [root@localhost] #

If you see it, it means the server is installed.

Check whether apache is installed and its version under linux

If it is installed through the rpm package, use the following command directly:

Rpm-Q httpd

You can also use the following two methods:

Httpd-v apachectl-v

Uninstall mysql under linux uninstall mysql under linux

a. Find the installed version of myslq:

# rpm-qa | grep mysql (pay attention to case and change MySQL if mysql fails)

Display:

[root@localhost ~] # rpm-qa | grep mysqlmysql-5.0.77-4.el5_4.2 mysql-server-5.0.77-4.el5_4.2 php-mysql-5.2.13-1.el5.art

The installed mysql package name such as: mysql-5.0.77-4.el5_4.2 will be displayed on the screen

Uninstall the searched package name:

# rpm-e-nodeps mysql-5.0.77-4.el5_4.2 (nodeps means forced deletion)

Prompt

Error: package-nodeps is not installed error: package mysql-.0.77-4.e15_.2 is not installed

Linux View mysql installation path

First, view the file installation path

Since the software is installed in more than one place, let's first check all the paths (addresses) of the file installation.

Take 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 check all the file paths with the following command

At the terminal, enter:

Whereis mysql

Enter, if you have installed mysql, the installation address of the file will be displayed, such as my display (the installation address may be different)

[root@localhost ~] # whereis mysql mysql: / usr/bin/mysql / usr/lib/mysql / usr/share/mysql / usr/share/man/man1/mysql.1.gz

Second, query the path where the running file is located (folder address)

If you only need to query the address where the file is running, you can simply use the following command (or take mysql as an example):

Which mysql

Terminal display:

[root@localhost ~] # which mysql / usr/bin/mysql "how to see if linux has mysql installed" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Database

Wechat

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

12
Report