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

Yum installs various versions such as mysql 5.6 and Candle 7.

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

Share

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

Http://repo.mysql.com/yum/

1. For a newly opened CVM, you need to check whether the system comes with mysql installed.

# yum list installed | grep mysql

two。 If you find a system that comes with mysql, do so decisively

# yum-y remove mysql-libs.x86_64

3. Feel free to execute it in the directory where you store the files. Explain here that because the yum source server of this mysql is abroad, the download speed will be relatively slow. Fortunately, the mysql5.6 is only 79m, while mysql5.7 has 182m, so this is the reason why I do not want to install mysql5.7.

# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

/ / http://repo.mysql.com this address contains a lot of mysql rpm packages, and then we can choose our own suitable one to download.

4. Then execute this sentence to explain that this rpm is not an installation file for mysql, but only two yum source files. After execution, there are more mysql-community-source.repo and mysql-community.repo in the / etc/yum.repos.d/ directory.

# rpm-ivh mysql-community-release-el6-5.noarch.rpm

5. At this point, you can use the yum repolist mysql command to see if you already have an mysql installable file

# yum repolist all | grep mysql

6. Install the mysql server command (all the way yes):

# yum install mysql-community-server-y installation (- y whether to select y directly without manual trigger)

7. After successful installation

# service mysqld start

8. Since the password of the root user of mysql is empty by default when mysql is installed, we need to log in in time with the root user of mysql (enter key for the first time, no need to enter the password) and change the password

# mysql-u root

# use mysql

# update user set password=PASSWORD ("enter root user password here") where User='root'

# flush privileges

9. Check whether mysql is self-starting, and set the self-start command to be turned on.

# chkconfig-- list | grep mysqld

# chkconfig mysqld on

10.mysql security settings (the system will ask you a few questions all the way, but you can't understand the translation after copying, basically all the way yes):

# mysql_secure_installation

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