zoukankan      html  css  js  c++  java
  • MySQL5.7安装

    MySQL5.7安装

    1.yum安装,先要搞到源

    wget http://repo.mysql.com/mysql57-community-release-el7-9.noarch.rpm

    sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm

    2.更新yum软件包

    yum check-update  

    3.更新系统

    yum update

    4.安装mysql

    yum install mysql mysql-server

    *********************接下来是漫长的等待。如果中途关机,或者下载挂了,请执行卸载步骤后,再来一次。完成后记住要给root上密码***********

    systemctl start mysqld

    grep 'temporary password'  /var/log/mysqld.log

    mysql -u root

    mysql> update mysql.user set authentication_string=password('admin') where user='root' and Host ='localhost';

    mysql> flush privileges;

    mysql> quit;

    5.启动与开放远程访问

    systemctl start mysqld

    mysql -u root -p

    6.授权远程访问

    use mysql;

    grant all privileges  on *.* to root@'%' identified by "admin";

    grant all privileges  on *.* to piwik@'%' identified by "ph20190420";

    FLUSH PRIVILEGES;

    create user user@'%' identified by 'admin'

    7.查看初始密码

    grep 'temporary password'  /var/log/mysqld.log

    1.root登陆mysql

    8.密码强度低时报错问题解决

    mysql> set global validate_password_policy=0;   

      

    mysql> set global validate_password_mixed_case_count=0;    

    mysql> set global validate_password_number_count=3;    

    mysql> set global validate_password_special_char_count=0;

    mysql> set global validate_password_length=3;    

    alter user root@localhost identified by 'admin';

    9.数据库启动,停止,重启

    systemctl start mysqld

    systemctl stop mysqld

    service mysqld restart

    10.修改max_allowed_packet

    VI打开/etc/my.cnf,增加下面一行,这句话是把上传文件大小改到64M

    max_allowed_packet = 64M    piwik建议

    查看当前大小

    show variables like '%max_allowed_packet%'; 

    至此,安装过程结束,以上为亲自实操,或许由于环境问题,好多异常情况没有遇见,希望大家一起多多交流,共同成长,不足之处请多多批评

  • 相关阅读:
    对软件测试的理解
    Android 经典欧美小游戏 guess who
    Shell脚本 | 安卓应用权限检查
    自动化测试 | UI Automator 进阶指南
    Shell脚本 | 截取包名
    自动化测试 | UI Automator 入门指南
    杂谈随感 | 与测试无关
    Shell脚本 | 性能测试之内存
    Shell脚本 | 健壮性测试之空指针检查
    "java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation."问题解决
  • 原文地址:https://www.cnblogs.com/michaelcnblogs/p/11330745.html
Copyright © 2011-2022 走看看