CentOS7安裝部署MySql5.7.15
阿新 • • 發佈:2018-12-19
一、準備
rpm -qa | grep mariadb
rpm -e mariadb-libs-5.5.44-2.el7.centos.x86_64 --nodeps
rpm -qa | grep mysql
rpm -e mysql57-community-release-e17-8.noarch
下載https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
二、解壓
tar xvf mysql-5.7.15-1.el7.x86_64.rpm-bundle.tar
三、安裝
rpm -ivh mysql-community-common-5.7.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.15-1.el7.x86_64.rpm
可考慮加:--nodeps --force
四、初始化
mysqld --initialize-insecure --user=mysql
mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
五、啟動
systemctl start mysqld.service
六、登陸
mysql -h localhost -u root -p
無密碼
Windows部署:
1、下載
2、解壓
3、初始化
mysqld --initialize-insecure --user=mysql--basedir=d:\\mysql5.7.18 --datadir=d:\\mysql5.7.18\data
mysqld
或
mysqld -install
net start mysql