CentOS 安装mysql8.0
下载yum源安装包
yum localinstall https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
安装
yum install mysql-community-server
启动服务
service mysqld start
查看状态
service mysqld status
查看初始密码
grep 'temporary password' /var/log/mysqld.log
登录
mysql -u root -p
修改密码
alter user'root'@'localhost' identified by '你的密码';
设置允许外部访问
create user 'root'@'%' identified with mysql_native_password by '你的密码';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
作者:[一柒微笑]

浙公网安备 33010602011771号