• Linux 安装Mysql1.8【yum安装】


    1.下载mysql的yum源
    wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
    2.安装yum源
    yum localinstall mysql57-community-release-el7-8.noarch.rpm
    3.检查是否安装成功
    yum repolist enabled | grep "mysql.*-community.*"
    3.安装mysql
    yum install mysql-community-server
    4.启动服务
    systemctl start mysqld
    5.设置开机启动
    systemctl enable mysqld
    systemctl daemon-reload
    5.
    修改root密码
    mysql安装完成之后,在/var/log/mysqld.log文件中给root生成了一个默认密码。通过下面的方式找到root默认密码,然后登录mysql进行修改:
    5.1 grep 'temporary password' /var/log/mysqld.log
    5.2 mysql -uroot -p
    输入密码 5.3
    先把5.7之后默认加的密码验证关闭
    set global validate_password_policy=0;
    set global validate_password_number_count=3;
    set global validate_password_length=3;
    setglobal validate_password_length=3;
    set global validate_password_special_char_count=0;
    SHOW VARIABLES LIKE 'validate_password%';
    ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

    6.默认只允许本地连接,需要授权 
    grant all privileges on *.* to 'root' @'%' identified by '123456';
    flush privileges;
    7.默认配置文件
    配置文件:/etc/my.cnf
    日志文件:/var/log//var/log/mysqld.log
    服务启动脚本:/usr/lib/systemd/system/mysqld.service
    socket文件:/var/run/mysqld/mysqld.pid
    --------------------------------------------------------------------------------------------------------底线------------------------------------------------------------------------------------------------------------------

    setglobal validate_password_length=3;

    redhat6.8安装问题:

    1.Error: Package: 2:postfix-2.6.6-8.el6.x86_64 (base)

      yum update postfix

    2.

    Error: Package: mysql-community-server-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-client-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-client-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-libs-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-server-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-libs-compat-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-server-5.7.30-1.el7.x86_64 (mysql57-community)
    Error: Package: mysql-community-server-5.7.30-1.el7.x86_64 (mysql57-community)

    删除 yum remove  mysql mysql-server mysql-libs mysql-server

    检查 rpm -qa | grep -i mysql

    3.PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '26.el6')

      yum install -y PackageKit-yum
    4.PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '26.el6')

          yum install -y PackageKit-yum-plugin
    5.rhn-check-1.0.0.1-38.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')

      yum remove 'rhn-check-1.0.0.1-38.el6.noarch'

  • 相关阅读:
    从头编写 asp.net core 2.0 web api 基础框架 (1)
    希腊字母表
    Python数据分析(二): Numpy技巧 (4/4)
    Python数据分析(二): Numpy技巧 (3/4)
    Python数据分析(二): Numpy技巧 (2/4)
    OLED液晶屏幕(3)串口读取文字并分割
    OLED液晶屏幕(2)取模软件
    OLED液晶屏幕(0)自动获取12ic地址液晶屏幕
    OLED液晶屏幕(1)OLED液晶屏幕ssd1306驱动芯片 arduino运行 ESP8266-07可以 12f不可以
    I2C 连接 12864 OLED 屏幕
  • 原文地址:https://www.cnblogs.com/jin-nuo/p/11997292.html
Copyright © 2020-2023  润新知