A version
MySQL 8.0.13 Enterprise Edition
Linux:CentOS-6.5-x86_64-bin-DVD1
Second, the installation step
1, with Filezilla software installation package MySQL / Linux under uploaded to the / usr / local tmp
2, CentOS 6.5 MySQL will bring their own, need to uninstall, to see the original installation of MySQL
rpm -qa | grep mysql
Display: mysql-libs-5.1.71-1.el6.x86_64
3, MySQL uninstall
rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64
4, load dependencies
yum install numactl libaio perl-Time-HiRes per-devel -y
5, extract
tar xvf mysql-8.0.13-1.el6.x86_64.rpm-bundle.tar
6, after decompression have several installation package installed in order
rpm -ivh mysql-community-common-8.0.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-compat-8.0.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-8.0.13-1.el6.x86_64.rpm
7, start MySQL
service mysqld start
View startup state
service mysqld status
Set boot
chkconfig mysqld on
8, generates a random password
grep 'temporary password' /var/log/mysqld.log
9, random password
method one:
mysql -u root -p密码
Second way:
mysql -u root -p回车
密码
10, change passwords
MySQL password rules are complex, preferably provided with case passwords, special symbols, numbers, e.g. MyPwd @ 233
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';
11, authorized remote connection
use mysql;
update user set host = '%' where user = 'root';
12, refresh configuration
FLUSH PRIVILEGES;
13, exit MySQL operation
exit;
14, open the firewall
vim /etx/sysconfig/iptables
Adding open port (port 22 on the next line can be)
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
Restart the firewall
service iptables start //开启防火墙
service iptables stop //关闭防火墙
service iptables restart //重启防火墙
chkconfig iptables on //开启防火墙
chkconfig iptables off //关闭防火墙,再次开机不会打开防火墙,不建议关闭
15, completed ~~