• 在虚拟机里面安装mysql


    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/
  • 相关阅读:
    kafka学习默认端口号9092
    kafka搜索介绍
    进程线程区别
    linux下的mysql修改默认编码
    [LeetCode] #19 Remove Nth Node From End of List
    [LeetCode] #18 4Sum
    [LeetCode] #17 Letter Combinations of a Phone Number
    [LeetCode] #16 3Sum Closest
    编程之美2015 #1 2月29日
    编程之美2015 #2 回文字符序列
  • 原文地址:https://www.cnblogs.com/q2546/p/11378084.html
Copyright © 2020-2023  润新知