centos6.8使用rpm包安装mysql5.7.25


http://mirrors.163.com/centos/
http://mirrors.163.com/centos/6.10/isos/x86_64/
http://mirrors.163.com/centos/6.10/isos/x86_64/CentOS-6.10-x86_64-minimal.iso

https://dev.mysql.com/downloads/mysql/
https://dev.mysql.com/downloads/mysql/5.7.html#downloads
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.25-1.el6.x86_64.rpm-bundle.tar


vi /etc/sysconfig/network-scripts/ifcfg-etho
/etc/init.d/network restart

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
/etc/init.d/iptables restart


yum install net-tools
yum install -y perl-Module-Install.noarch
yum install -y numactl


rpm -qa | grep mysql
rpm -e mysql             //普通删除模式
rpm -e --nodeps mysql        // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除


find / -name mysql
rm -rf /etc/my.cnf


rpm -ivh mysql-community-common-5.7.25-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.25-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.25-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-5.7.25-1.el6.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.25-1.el6.x86_64.rpm

service mysqld start

grep 'temporary password' /var/log/mysqld.log

ALTER USER 'root'@'localhost' IDENTIFIED BY 'pass&Word9';
CREATE USER 'loginName'@'%' IDENTIFIED BY 'pass&Word9';
GRANT ALL ON *.* TO 'loginName'@'%';
FLUSH PRIVILEGES;


vi /etc/my.cnf

[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci

service mysqld restart


 

转载于:https://my.oschina.net/wangweizhen/blog/3024912

你可能感兴趣的:(centos6.8使用rpm包安装mysql5.7.25)