zoukankan      html  css  js  c++  java
  • CentOS 7.4 64位/ mysql

    1.安装mysql.

    下载repo源  #  wget http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm

    安装repo源  #  rpm -ivh mysql57-community-release-el7-7.noarch.rpm

    获得/etc/yum.repos.d/mysql-community.repo/etc/yum.repos.d/mysql-community-source.repo两个源

    开始安装 

    # yum install mysql-server
    # yum install mysql-devel
    # yum install mysql
    # rpm -qa | grep -i mysql

    # service mysqld status 查看mysql当前的状态
    # systemctl status mysqld

    # service mysqld stop 停止mysql
    #systemctl stop mysqld

    # service mysqld restart 重启mysql
    #systemctl restart mysqld

    # service mysqld start 启动mysql
    # systemctl start mysqld

    设置mysql开机启动 # systemctl enable mysqld

    启动mysql服务   systemctl start mysqld  或者 service mysqld start

    设置跳过登录 在/etc/my.cnf中添加skip-grant-tables

    重启 service mysqld restart  之后直接# mysql 进入mysql

    然后重新设置密码:

    mysql> use mysql;

    mysql> show tables;

    select user,authentication_string from user;


    update mysql.user set authentication_string=password('your password') where user='root';


    flush privileges;

    exit;

    不建议开启远程连接,  看这里

    修改密码策略:

    set global validate_password_policy=0;
    set global validate_password_length=1;

    然后修改密码:

    alter user 'root'@'localhost' identified by '新密码';
    
    

    mysql 忽略大小写:  lower_case_table_names=1

    mysql 5.7  sql_mode ONLY_FULL_GROUP_BY :

      select @@global.sql_mode;

      Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column '数据库名.o.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

      解决:   my.cnf文件中:  sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

    
    
     
  • 相关阅读:
    (转载)Java读取ipa中info.plist获取版本信息
    (转)使用Eclipse开发Android源码
    IOS端的摇一摇功能
    (转) 自动编译iOS工程,生成app及ipa文件的方法
    Mac OS 上设置 JAVA_HOME
    macjava
    JS超级酷的导航菜单代码
    JavaScript+Css实现的鼠标悬停时动态翻滚的紫色菜单导航
    全国的省市县联动代码
    【荐】JavaScript制作可伸缩的淡绿色菜单导航
  • 原文地址:https://www.cnblogs.com/rempop/p/10522877.html
Copyright © 2011-2022 走看看