当前位置:Gxlcms > 数据库问题 > 在虚拟机里面安装mysql

在虚拟机里面安装mysql

时间:2021-07-01 10:21:17 帮助过:4人阅读

https://dev.mysql.com/downloads/repo/yum/ 首先到网站里面下载 mysql80-community-release-el7-3.noarch.rpm 通过xftp上传mysql80-community-release-el7-3.noarch.rpm到linux系统 安装仓库
yum install mysql80-community-release-el7-3.noarch.rpm
cd /etc/yum.repos.d 修改mysql-community.repo
vi mysql-community.repo
修改mysql-community.repo # Enable to use MySQL 5.5
[mysql55-community]
name=MySQL 5.5 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/7/$basearch/
enabled=1   #原来是enabled=0,改成enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql   [mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/
enabled=0    #原来是enabled=1,改成enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql     搜索MySQL
yum search mysql 安装
yum install mysql-community-server.x86_64 启动mysql
systemctl start mysqld 查看状态
systemctl status mysqld 设置开机启动
systemctl enable mysqld 开放3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload 用Windows的SQLyon连接Linux的Mysql
如报1130的错误,参考https://www.wangshenghua.com/d1412acdcf52c4490d61ef580d8422a9/

在虚拟机里面安装mysql

标签:arc   ane   启动mysql   win   use   下载   enable   通过   http   

人气教程排行