####### yum repository install #######
mysql yum repo http://repo.mysql.com/
wget http://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
yum localinstall mysql57-community-release-el7-11.noarch.rpm
yum repolist all | grep mysql

####### mysql install #######
yum install mysql-community-server
systemctl start mysqld
systemctl enable mysqld

####### find password and login #######
grep 'temporary password' /var/log/mysqld.log
mysql -uroot -p

####### password update #######
alter user 'root'@'localhost' identified by '+P4ssword+';
or
set password for 'root'@'localhost'=password('+P4ssword+');

####### add user and grant privileges #######
create user 'myroot'@'%' identified by '+P4ssword+';
grant all privileges on *.* to 'myroot'@'%';
flush privileges;
or
grant select on *.* to 'myreader'@'%' identified by '+P4ssword+';
flush privileges;

####### my.cnf #######
[mysqld]
innodb_buffer_pool_size=512M

collation-server=utf8mb4_general_ci
init-connect='SET NAMES utf8mb4'
character-set-server=utf8mb4
skip-character-set-client-handshake
sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

bind-address=0.0.0.0
max_connections=500

[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4

systemctl restart mysqld

test_db-master(https://codeload.github.com/datacharmer/test_db/zip/master

mysql -uroot -p -t < employees.sql

 

mysql57 centos7 使用的更多相关文章

  1. 独立安装CentOS7.4全记录

    大学用了四年的笔记本快用废了,闲来想着用来装个centos,当个服务器也行,于是装上了CentOS6.9系统,由于最小化安装,而且在安装时没有安装wpa_supplicant包,笔记本本身网卡接口又坏 ...

  2. 关于centos7中使用rpm方式安装mysql5.7版本后无法使用root登录的问题

    最近在centos7中通过rpm方式安装了最新版本的mysql-server 5.7 (mysql57-community-release-el7-7.noarch.rpm) ,发现安装成功后无法使用 ...

  3. Linux版 MySql57安装教程

    这里介绍的是CentOS7.4安装mysql57的教程 创建MySQL文件包 使用mkdir -p 文件夹路径创建以下目录: 文件夹路径 用途 /usr/local/mysql MySQL安装路径 / ...

  4. Virtual Box配置CentOS7网络(图文教程)

    之前很多次安装CentOS7虚拟机,每次配置网络在网上找教程,今天总结一下,全图文配置,方便以后查看. Virtual Box可选的网络接入方式包括: NAT 网络地址转换模式(NAT,Network ...

  5. [原]CentOS7.2部署node-mapnik

    转载请注明表作者think8848及出处(http://think8848.cnblogs.com) node-mapnik依赖项中要求g++ >= 5, toolchain (>= GL ...

  6. 在centos7上安装ClamAV杀毒,并杀毒(centos随机英文10字母)成功

    前言 上传文件的时候发现总是失败,查看top发现有个进程一直cpu占用80%以上,而且名称还是随机数.kill之后,一会儿又重新生成了.突然发现居然没有在服务端杀毒的经历.在此处补齐. 安装clama ...

  7. 在centos7上安装Jenkins

    在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...

  8. CentOS7使用firewalld打开关闭防火墙与端口(转载)

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...

  9. CentOS7之按时间段截取指定的Tomcat日志到指定文件的方法

    CentOS7之按时间段截取指定的Tomcat日志到指定文件的方法 sed -n '/2016-11-02 15:00:/,/2016-11-02 15:05:/p' catalina.out > ...

随机推荐

  1. 数据库查询的数据导出到xls表,集合数据导出到xls表

    //实体类package com.outxls; public class Student { private Integer studentId; private String studentNam ...

  2. java 中重写toString()方法

    toString()方法 一般出现在System.out.println(类名.toString()); toString()是一种自我描述方法 本身返回的是 getClass().getName() ...

  3. npm笔记

    #执行npm start时是运行的哪个js文件? 打开package.json看看scripts属性中start配置的是什么运行脚本,这里配置的就是你执行npm start时跑的脚本 #设置npm的源 ...

  4. 在Windows Server 2008 R2 Server中,连接其他服务器的数据库遇到“未启用当前数据库的 SQL Server Service Broker,因此查询通知不受支持。如果希望使用通知,请为此数据库启用 Service Broker ”

    项目代码和数据库部署在不同的Windows Server 2008 R2 Server中,错误日志显示如下: "未启用当前数据库的 SQL Server Service Broker,因此查 ...

  5. Micro和Macro性能学习【转载】

    转自:https://datascience.stackexchange.com/questions/15989/micro-average-vs-macro-average-performance- ...

  6. JAVA:IDEA使用Hibernate(2)

    1.打开IDEA新建项目 勾选Hibernate.勾选下方生成相关配置和类 下方选择Download,如果使用本地已经下载的包则选择 Use Library ,路径选到包里面的require里导入即可 ...

  7. HttpResponse输出文件

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx. ...

  8. Kafka笔记2(安装)

    1.安装java 2.安装zookeeper 3.安装kafka Broker 测试:发布消息 测试:读取消息 4,broker配置 常规配置: broker.id: 默认0  每个broker都需要 ...

  9. #WEB安全基础 : HTTP协议 | 0x8 HTTP的Cookie技术

    说道Cookie,你喜欢吃饼干吗? 这里的Cookie不是饼干=_= HTTP不对请求和响应的通信状态进行保存,所以被称为无状态协议,为了保持状态和协议功能引入了Cookie技术 Cookie技术在请 ...

  10. java socket编程实例代码

    1.所谓socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄.应用程序通常通过"套接字"向网络发出请求或者应答网络请求. 两性话题 两性 ...