yum方式安裝mysql

一、Adding the MySQL Yum Repository
centos 6mysql

rpm -Uvh https://repo.mysql.com//mysql80-community-release-el6-1.noarch.rpm

centos 7sql

rpm -Uvh https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm

二、Selecting a Release Seriescentos

yum repolist all | grep mysql
yum-config-manager --disable mysql80-community
yum-config-manager --enable mysql57-community

注:提示命令不存在,yum install yum-utils -yide

三、Installing MySQLui

yum install mysql-community-server

四、Starting the MySQL Server
centos 6spa

service mysqld start

centos 7code

systemctl start mysqld.service

五、Securing the MySQL Installation (for MySQL 5.6 only)component

mysql_secure_installation

六、MySQL Server Initialization (for MySQL 5.7 only)server

grep 'temporary password' /var/log/mysqld.log
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

七、Installing Additional MySQL Products and Componentsblog

yum --disablerepo=\* --enablerepo='mysql*-community*' list available
yum install package-name

八、list all the installed packages for the MySQL components

yum list installed | grep "^mysql"

官方地址:https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

相關文章
相關標籤/搜索