####### 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. ie9 remove出错 jquery SCRIPT5007: 缺少对象

    针对IE11 remove不起作用的问题. 其中IE11.0.37也不支持 IE11.0.42支持可能是由于客户机器设置了兼容模式的原因. 因为里面包含了object元素,移除数据的时候发生的bug. ...

  2. 使用阿里云公网ip建立bind,监听客户端连接失败

    bind: Cannot assign requested address 网上的众多答案不能解决我的问题 通过ping可以ping通,但是 使用bind代码,这个ip就是不能用的, 使用 ifcon ...

  3. 如何解决PuTTY中文乱码的问题

    我们可以使用PuTTY这个工具在一台机器上对其它linux系统进行连接和操作.如果大家都在linux系统中,可以在终端中用ssh ip或主机名直接连接. 如果要在windows中对远程的linux系统 ...

  4. awt多线程聊天

    public class ChatServer { boolean started = false; ServerSocket serverSocket = null; public void sta ...

  5. idea便利配置使用配置

    让properties能够中文正确显示 1.file encoding ---改为utf-8 spring的autowried没得错误,mybaties没得黄色背景 inspections--spri ...

  6. npm笔记

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

  7. 快速搭建完整zabbix3.4

    一.准备工作OS:centos7.4Zabbix version:3.4.6(2018/1/15日上线的新版本)Database:MariaDB关闭防火墙:systemctl stop firewal ...

  8. threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/dyuproject/protostuff/MapSchema$MessageFactory] with root cause

    错误记录 前几天朋友问我一个错误,顺便记录一下,关于redis 工具类,protostuff序列化报错. threw exception [Handler processing failed; nes ...

  9. Jenkins+Jmeter持续集成笔记(二:ANT执行Jmeter脚本)

    Jmeter接口测试脚本运行后生成的是jtl(xml)格式的文件,这些文件不具备可读性,所以我们要把他转化为可以阅读的html格式报告. Ant是一个功能强大的打包编译工具.我们使用他的目的是将xml ...

  10. final、finally、finalize区别

    final final关键字可以用来修饰类,方法以及成员变量,当用在不同的场景下时具有不同的意义. 修饰类 如果修饰类,则代表这个类不可继承 修饰方法 如果修饰方法,则代表这个方法不可覆写:同时,允许 ...