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 install mysql with yum under linux

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces the relevant knowledge of how to install mysql with yum under linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this linux article on how to install mysql with yum. Let's take a look at it.

Method: 1. Install mysql using "yum-y install mysql-server mysql mysql-devel" command, when the result shows "Complete!" That is, the installation is complete; 2, use the "service mysql start" command to start and use.

The operating environment of this article: centos 7 system, mysql5.5.7 version, Dell G3 computer.

How to install mysql with yum under linux

1. Check whether the mysql that comes with CentOS is installed.

Enter:

Yum list installed | grep mysql

2. If you have your own mysql installed, how to uninstall the CentOS system with its own mysql database?

Enter:

Yum-y remove mysql-libs.x86_64

If there are multiple dependent files, uninstall them in turn.

When the result shows Complete! That is, the uninstall is complete.

3. Check the mysql version information on the yum library (the CentOS system needs to connect to the network normally).

Enter:

Yum list | grep mysql or yum-y list mysql*

4. Use yum to install mysql database.

Enter:

Yum-y install mysql-server mysql mysql-devel

The command installs: mysql-server, mysql, mysql-devel, when the result shows "Complete!" The installation is complete.

(note: installing mysql only installs the database, and only installing mysql-server is equivalent to installing the client. )

5. Check the information about the version of the mysql database that you just installed.

Enter:

Rpm-qi mysql-server

(note: only mysql is installed at this time. To use it, start mysql first. )

Here are the login steps!

Startup instruction:

1. Use service to start:

[root@localhost /] # service mysqld start (version 5.0 is mysqld) [root@szxdb etc] # service mysql start (version 5.5.7 is mysql)

2. Use the mysqld script to start:

/ etc/inint.d/mysqld start

3. Use safe_mysqld to start:

Safe_mysqld&

(note: after starting successfully, press enter: mysql to enter directly)

Add new users after entering

Insert into mysql.user (Host,User,Password) values ("localhost", "xxx", password ("*"))

(note: xxx is the new user name and * * is the user password)

In the future, you can use this user to enter mysql. Format: mysql-u account-p password

This is the end of the article on "how to install mysql with yum under linux". Thank you for reading! I believe you all have a certain understanding of "how to install mysql with yum under linux". If you want to learn more, you are welcome to follow the industry information channel.

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

Servers

Wechat

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

12
Report