MySQL安装包下载地址

  |   0 评论   |   384 浏览

背景

快速直达

内容

mysql 5.7.11

wget http://dev.MySQL.com/get/Downloads/MySQL-5.7/mysql-5.7.11-Linux-glibc2.5-x86_64.tar.gz

mysql 8.0.13

下载安装包

wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-common-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-libs-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-client-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-server-8.0.13-1.el7.x86_64.rpm

安装

rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm

遇到冲突的旧包,将其卸载掉。遇到没有安装的包,手动将其安装上。

启动

初始化数据库

mysqld --initialize --console

目录授权,否则启动失败

chown -R mysql:mysql /var/lib/mysql/

启动服务

systemctl start mysqld

加密

mysql_secure_installation

进入

默认密码在 mysqld.log 中可以找到。

grep pass /var/log/mysqld.log

参考

评论

发表评论

validate