12°

centos6.10 rpm安装mysql5.7.29

应为某些原因,系统使用得是mysql5.7,

地址:https://dev.mysql.com/downloads/mysql/

下载文件:mysql-5.7.29-1.el6.x86_64.rpm-bundle.tar

tar -xvf mysql-5.7.29-1.el6.x86_64.rpm-bundle.tar

mysql-community-devel-5.7.29-1.el6.x86_64.rpm           
mysql-community-libs-5.7.29-1.el6.x86_64.rpm         
mysql-community-test-5.7.29-1.el6.x86_64.rpm
mysql-community-client-5.7.29-1.el6.x86_64.rpm  
mysql-community-embedded-5.7.29-1.el6.x86_64.rpm        
mysql-community-libs-compat-5.7.29-1.el6.x86_64.rpm
mysql-community-common-5.7.29-1.el6.x86_64.rpm  
mysql-community-embedded-devel-5.7.29-1.el6.x86_64.rpm  
mysql-community-server-5.7.29-1.el6.x86_64.rpm

 

rpm -qa | grep mariadb
rpm -qa |grep mysql
rpm -e mysql-libs --nodeps

 

rpm -ivh mysql-community-common-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-compat-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-embedded-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-embedded-devel-5.7.29-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-5.7.29-1.el6.x86_64.rpm
yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-JSON net-tools
rpm -ivh mysql-community-test-5.7.29-1.el6.x86_64.rpm


 

#chkconfig mysqld --list

#service mysqld status #service mysqld start Initializing MySQL database:                         [  OK  ] Starting mysqld:                                           [  OK  ]

#grep password /var/log/mysqld.log 2020-01-14T05:14:27.178155Z 1 [Note] A temporary password is generated for root@localhost: M<DkyXKrf8zz 2020-01-14T05:14:31.109805Z 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO)

 

数据库的密码需要满足以下条件:大小写字母,数字和特殊符号
set password = password("root__123AbCdHjKl");
flush privileges;
quit


create database dbtest default charset=utf8mb4  COLLATE utf8mb4_general_ci;

SELECT  USER,authentication_string,HOST FROM USER;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root__123ABC' ;
revoke all privileges on *.* from `root`@`%`;

 

 

 

 

 

 

 

 

本文由【独钓渔】发布于开源中国,原文链接:https://my.oschina.net/lenglingx/blog/3158217

全部评论: 0

    我有话说: