centos 6.8 安装mysql

1. 下载rpm包

wget https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

2.安装rpm包

rpm -Uvh mysql57-community-release-el6-9.noarch.rpm 

yum localinstall -y mysql57-community-release-el6-9.noarch.rpm  

3. 安装mysql

yum install mysql-community-server

4.开启服务

service mysqld start

查找密码

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

登入

mysql -uroot -p

修改密码

alter user 'root'@'localhost' identified by '123456';

centos7 安装MySQL

mysql 主从复制

你可能感兴趣的:(Lnmp,mysql)