zoukankan      html  css  js  c++  java
  • 基于CentOS 7.9环境部署MySQL 5.7服务

    sudo yum -y install vim
    
    sudo setenforce Permissive
    
    sudo vim /etc/selinux/config
      SELINUX=permissive
    
    sudo systemctl stop firewalld.service
    sudo systemctl disable firewalld.service
    
    sudo su -
    echo -e '[mysql57-community]
    name=MySQL 5.7 Community Server
    baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
    enabled=1
    gpgcheck=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
    ' > /etc/yum.repos.d/mysql-community.repo
    exit
    
    sudo yum -y install mysql-community-server
    
    sudo mkdir -p /data/var/lib/mysql/
    sudo chown mysql:mysql /data/var/lib/mysql/
    sudo chmod o-r /data/var/lib/mysql/
    
    sudo mkdir /data/var/log/
    
    sudo touch /data/var/log/mysqld.log
    sudo chown mysql:mysql /data/var/log/mysqld.log
    sudo chmod o-r /data/var/log/mysqld.log
    
    sudo vim /etc/my.cnf
      [mysql]
      socket=/data/var/lib/mysql/mysql.sock
    
      [mysqld]
      datadir=/data/var/lib/mysql
      socket=/data/var/lib/mysql/mysql.sock
      log-error=/data/var/log/mysqld.log
    
      character-set-server=utf8mb4
      collation-server=utf8mb4_general_ci    # MySQL 8.0 utf8mb4_0900_ai_ci
    
    sudo systemctl enable mysqld.service
    sudo systemctl start mysqld.service
    
    sudo grep 'temporary password' /data/var/log/mysqld.log
    
    mysql -uroot -p
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
    quit
  • 相关阅读:
    xp sp3下 IIS5.1 配置python 的正确方法
    asp 采集不到数据,采集不成功 拒绝访问 msxml3.dll 错误 '80070005' 的解决方法
    列表样式
    css文本属性
    css背景属性
    常规流练习
    盒模型练习
    定位体系相关练习
    层叠机制的步骤
    简单网页的制作——html
  • 原文地址:https://www.cnblogs.com/f0rsaken/p/14134785.html
Copyright © 2011-2022 走看看