CentOS6.5 mysql-5.7.18-1をインストールします.el6.x86_64.rpm-bundle.tar

6253 ワード

まずは公式サイト(https://dev.mysql.com/downloads/mysql/)で、Select Operating SystemでRed Hat Enterprise Linux/Oracle Linuxを選択し、Select OS VersionでRed Hat Enterprise Linux 6/Oracle Linux 6(x 86,64-bit)を選択し、RPM Bundleをダウンロードしてダウンロードしたファイルをサーバ/usr/localにアップロードし、次のコマンドを実行します.
rpm -qa|grep mysql #  mysql    ,          ,   
yum -y remove mysql-libs-5.1.71-1.el6.x86_64 
 #  
cd /usr/local/ #    
tar -xvf mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar
 #  
rpm -ivh mysql-community-common-5.7.18-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.18-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm
yum install perl #  server       
yum install numactl #  server       
yum install libaio #         
rpm -ivh mysql-community-server-5.7.18-1.el6.x86_64.rpm
service mysqld start #  mysqld  
netstat -tlunp #        
cat /var/log/mysqld.log | more #    ,     
cat /etc/issue #      
getconf LONG_BIT #      

以下に示す
2017-06-16T04:48:19.788616Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-16T04:48:22.099994Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-06-16T04:48:22.332387Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-06-16T04:48:22.405922Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 068f9e70-524f-11e7-80fb-000c297c9986.
2017-06-16T04:48:22.409115Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-06-16T04:48:22.410417Z 1 [Note] A temporary password is generated for root@localhost: dee5h,lqSA>)

次に、次のコマンドを実行します.
mysql -uroot -pdee5h,lqSA>)
alter user 'root'@'localhost' identified by 'Mysql@123456'; #  root    Mysql@123456
use mysql;
update user set user.Host='%' where user.User='root';
flush privileges;
exit;
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT #    3306
/etc/rc.d/init.d/iptables save #    
/etc/init.d/iptables restart #     iptables