Mysql安装说明

mysql Linux安装参考

# 获取安装包:
wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
yum -y install mysql80-community-release-el7-3.noarch.rpm
yum -y install mysql-community-server --nogpgcheck

# 启动mysql服务:
systemctl start mysqld.service

# 查看默认密码:
cat /var/log/mysqld.log | grep password

# 使用默认密码登录: 
mysql -uroot -p

# 修改密码为Root1234!,开放远程连接, 其中localhost是允许的ip:
alter user'root'@'localhost' identified with mysql_native_password by 'Root1234!';

update mysql.user set host='%' where user='root';

flush privileges;

你可能感兴趣的:(Mysql,mysql,数据库)