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';
  • 相关阅读:
    eclipse生成jar包 注意事项!
    java结合testng,利用XML做数据源的数据驱动示例
    2018 计蒜之道 初赛 第二场
    2018 计蒜之道 初赛 第一场
    Tarjan&&缩点简析
    POJ1159
    POJ1080
    POJ1260
    POJ2533&&1836&&3176
    Luogu P1484 种树
  • 原文地址:https://www.cnblogs.com/devan/p/14919481.html
Copyright © 2011-2022 走看看