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

The CentOS environment uses the yum command to install the MySQL tutorial

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

The following mainly brings you the CentOS environment to install MySQL tutorials using yum commands. I hope these texts can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

Generally, the steps to install mysql under linux are as follows:

See if mysql has been installed before installation

Yum list installed mysql*

If so, use yum remove to uninstall mysql

Check to see if there is mysql-server under the yum library

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

Rpm-qa | grep mysql

Once again, I will not repeat the specific uninstallation method here. I deleted it with reference to the following blog post:

Https://www.cnblogs.com/cyl048/p/6879085.html

# if not (usually not under centos7)

Wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

Rpm-ivh mysql-community-release-el7-5.noarch.rpm

# then install mysql

Yum install mysql-server

1),

2),

3),

4),

Yum install mysql-devel

1),

2),

If there is a mysql-server, follow these steps

Install the mysql client:

Yum install mysql

Then add character-set-server=utf8 to [mysqld] in the mysql configuration file / etc/my.cnf

Then start the mysql service

Service mysqld start

Log in to mysql

Mysql-u root-p

Just install the password is empty, press enter directly

At this point, the MySQL is installed.

Switch to mysql database: use mysql

Then change the password UPDATE user SET password=password ("your password") WHERE user='root'

Refresh permissions

FLUSH PRIVILEGES

Then log in with mysql-h 127.0.0.1-u root-p and enter the password

Then MySQL can be used normally!

For the above about the CentOS environment using the yum command to install MySQL tutorials, you do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

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