zoukankan      html  css  js  c++  java
  • MySQL 安装

    下载

    下载地址 : https://dev.mysql.com/downloads/mysql/

    -- 下载地址
    
    wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-client-plugins-8.0.25-1.el8.x86_64.rpm
    
    wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-common-8.0.25-1.el8.x86_64.rpm
    
    wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-libs-8.0.25-1.el8.x86_64.rpm
    
    wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-server-8.0.25-1.el8.x86_64.rpm
    
    wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-client-8.0.25-1.el8.x86_64.rpm
    --安裝順序,根据情况适当调整
    1) rpm -ivh mysql-community-common-8.0.25-1.el8.x86_64.rpm 2) rpm -ivh mysql-community-client-plugins-8.0.25-1.el8.x86_64.rpm 3) rpm -ivh mysql-community-client-8.0.25-1.el8.x86_64.rpm 4) rpm -ivh mysql-community-libs-8.0.25-1.el8.x86_64.rpm 5) rpm -ivh mysql-community-server-8.0.25-1.el8.x86_64.rpm
    -- 启动数据库
    service mysqld start

    -- 查看数据库运行状态
    service mysqld status

    -- 停止数据库
    service mysqld stop

    -- 重启
    service mysqld restart

    用户密码重置

    -- 打开mysql的配置文件
    vim /ect/my.cnf
    
    -- 添加如下两行配置,启用免密登录
    [mysqld]
    skip-grant-tables
    
    -- 重启M有SQL服务
    service mysqld restart
    
    -- 重新登录MySQL
    mysql -uroot -p

    -- 选择数据库
    use mysql
    -- 将root账号密码置空,该语句为MySQL 8.0 update user set authentication_string = '' where user = 'root'; -- 设置新密码 alter user user() identified by 'root@123456';

    修改加密方式

    -- 登录
    mysql -uroot -pRoot@123456
    
    -- 选择数据库
    use mysql
    
    -- 修改
    ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Root@123456';
  • 相关阅读:
    Unity周记: 2020.09.07-09.13
    Unity周记: 2020.08.31-09.06
    CF1060F Shrinking Tree
    洛谷P6783 [Ynoi2008] rrusq
    洛谷P5644 [PKUWC2018] 猎人杀
    洛谷P1587 [NOI2016] 循环之美
    洛谷P4466 [国家集训队] 和与积
    集合幂级数杂题
    Flink基础(49):FLINK SQL(25) 内置函数(七)表值函数
    Flink基础(48):FLINK SQL(24) 内置函数(六)条件函数
  • 原文地址:https://www.cnblogs.com/devan/p/14919481.html
Copyright © 2011-2022 走看看