zoukankan      html  css  js  c++  java
  • Centos6.7系统环境下使用 yum install 安装mysql-community-5.7.22(史上最简)

    在运维或者开发过程中,经常会遇见部署各类LNMP或者LAMP模式的系统运行架构,尤其再部署数据库时,往往有人对数据库使用过程倒是很多,但从头部署的情况少有发生,今天推荐一种简单的mysql安装操作:这简单是真正的简单

    简单的解决方案:

    1、yum源安装
    #yum install   #下载及安装yum源 
    #yum clean all                            #清理yum
    #yum makecache                            #重新缓存
    #yum install mysql-community-server       #yum安装 就这么简单
    2、开启服务
    #/etc/init.d/mysqld
    3、查找初始密码并修改
    #grep 'temporary password' /var/log/mysqld.log   #唯一不同的就是此处,安装完成后会有一个初始密码放置到log中,进行初始登录
    # grep 'temporary password' /var/log/mysqld.log
    2018-07-27T11:00:07.016171Z 1 [Note] A temporary password is generated for root@localhost: xxxxx
    # mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 4
    Server version: 5.7.22
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    mysql>
    #强制修改密码,否则无法使用。
    mysql> show databases;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    mysql> set password=password('test123');
    #密码复杂度要求。
    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
    #复杂度提高后成功。
    mysql> set password=password('Test@!234');
    Query OK, 0 rows affected, 1 warning (0.00 sec)

    4、yum安装过程中的会出现依赖程序问题,只需要先安装一下依赖即可

    #yum install mysql-devel

    通过以上简单安装步骤即可完成一键部署操作(需要整理方可成一键)

    在运维或者开发过程中,经常会遇见部署各类LNMP或者LAMP模式的系统运行架构,尤其再部署数据库时,往往有人对数据库使用过程倒是很多,但从头部署的情况少有发生,今天推荐一种简单的mysql安装操作:这简单是真正的简单

    简单的解决方案:

    1、yum源安装
    1
    2
    3
    4
    #yum install   #下载及安装yum源 
    #yum clean all                            #清理yum
    #yum makecache                            #重新缓存
    #yum install mysql-community-server       #yum安装 就这么简单
    2、开启服务
    1
    #/etc/init.d/mysqld
    4、查找初始密码并修改

     

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    #grep 'temporary password' /var/log/mysqld.log   #唯一不同的就是此处,安装完成后会有一个初始密码放置到log中,进行初始登录
    # grep 'temporary password' /var/log/mysqld.log
    2018-07-27T11:00:07.016171Z 1 [Note] A temporary password is generated for root@localhost: xxxxx
    # mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with or g.
    Your MySQL connection id is 4
    Server version: 5.7.22
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    mysql>
    #强制修改密码,否则无法使用。
    mysql> show databases;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    mysql> set password=password('test123');
    #密码复杂度要求。
    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
    #复杂度提高后成功。
    mysql> set password=password('Test@!234');
    Query OK, 0 rows affected, 1 warning (0.00 sec)

     

     

  • 相关阅读:
    Eclipse常用插件推荐
    Open Source Search Engines in Java
    Java: convert a file to a byte array, then convert byte array to a file.
    常用的Eclipse插件介绍
    一个搜索引擎周边的blog
    java文件读取。(单字节读取和按行读取读取)
    im4java
    csv格式读取通用类
    java以流方式下载文件struts2.x版_心灵的港湾_百度空间
    Jetty/Feature/Jetty Maven Plugin
  • 原文地址:https://www.cnblogs.com/zksfyz/p/9435041.html
Copyright © 2011-2022 走看看