下载MySQL 安装包 https://dev.mysql.com/downloads


安装 rpm -ivh 包名

默认配置 /etc/my.cnf

初始化mysql
mysqld --initialize --user=mysql --console
安装完密码默认存放在 /var/log/mysqld.log

修改root密码
alter user 'root'@'localhost' identified by '123456';
mysql 8修改远程可登录
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

启动mysql
service mysqld start
浙公网安备 33010602011771号