mysql 5.7.9(GA) 终于发布了,感受一下。

一、下载
下载页面 http://dev.mysql.com/downloads/mysql/
选择相应系统的版本下载。

本文OS为centos6.5 64bit 对应包为mysql-5.7.9-1.el6.x86_64.rpm-bundle

[root@TPCC2 ~]# ll mysql-5.7.9-1.el6.x86_64.rpm-bundle/
total 426792
-rw-r--r--. 1 root root 24134464 Oct 12 21:29 mysql-community-client-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 331912 Oct 12 21:30 mysql-community-common-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 3851928 Oct 12 21:30 mysql-community-devel-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 38081256 Oct 12 21:30 mysql-community-embedded-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 130479844 Oct 12 21:30 mysql-community-embedded-devel-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 2224356 Oct 12 21:31 mysql-community-libs-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 1720248 Oct 12 21:31 mysql-community-libs-compat-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 139636924 Oct 12 21:32 mysql-community-server-5.7.9-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 96549460 Oct 12 21:33 mysql-community-test-5.7.9-1.el6.x86_64.rpm

二、 安装
按照rpm包依赖性,依次安装
[root@localhost mysql-5.7.9-1.el6.x86_64.rpm-bundle]# rpm -ivh mysql-community-common-5.7.9-1.el6.x86_64.rpm
warning: mysql-community-common-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-common ########################################### [100%]
[root@localhost mysql-5.7.9-1.el6.x86_64.rpm-bundle]# rpm -ivh mysql-community-libs-*
warning: mysql-community-libs-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-libs ########################################### [ 50%]
2:mysql-community-libs-co########################################### [100%]
[root@localhost mysql-5.7.9-1.el6.x86_64.rpm-bundle]# rpm -ivh mysql-community-client-5.7.9-1.el6.x86_64.rpm
warning: mysql-community-client-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-client ########################################### [100%]
[root@localhost mysql-5.7.9-1.el6.x86_64.rpm-bundle]# rpm -ivh mysql-community-server-5.7.9-1.el6.x86_64.rpm
warning: mysql-community-server-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-server ########################################### [100%]
[root@localhost mysql-5.7.9-1.el6.x86_64.rpm-bundle]# rpm -ivh mysql-community-devel-5.7.9-1.el6.x86_64.rpm
warning: mysql-community-devel-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-devel ########################################### [100%]
三、初始化
1.创建用户和datadir目录
groupadd mysql
useradd -m -d /home/mysql -g mysql mysql

su - mysql
mkdir data

2.初始化my.cnf

[root@TPCC2 ~]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/home/mysql/data
socket=/home/mysql/data/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/home/mysql/data/mysqld.log
pid-file=/home/mysql/data/mysqld.pid

3.初始化数据库
mysqld --initialize --user=mysql
默认使用/etc/my.cnf

[mysql@localhost data]$ pwd
/home/mysql/data
[mysql@localhost data]$ ll
total 110624
-rw-r-----. 1 mysql mysql 56 Oct 23 12:59 auto.cnf
-rw-r-----. 1 mysql mysql 407 Oct 23 12:59 ib_buffer_pool
-rw-r-----. 1 mysql mysql 12582912 Oct 23 12:59 ibdata1
-rw-r-----. 1 mysql mysql 50331648 Oct 23 12:59 ib_logfile0
-rw-r-----. 1 mysql mysql 50331648 Oct 23 12:59 ib_logfile1
drwxr-x---. 2 mysql mysql 4096 Oct 23 12:59 mysql
-rw-r-----. 1 mysql mysql 991 Oct 23 12:59 mysqld.log
drwxr-x---. 2 mysql mysql 4096 Oct 23 12:59 performance_schema
drwxr-x---. 2 mysql mysql 12288 Oct 23 12:59 sys

4.临时密码
查找初始用户、密码

[mysql@localhost data]$ grep "A temporary password" mysqld.log
2015-10-23T04:59:09.504285Z 1 [Note] A temporary password is generated for root@localhost: BdwK<Crzy08g

四、启动

[mysql@localhost ~]$ mysqld_safe --user=mysql &
[1] 11255
[mysql@localhost ~]$ 151023 13:01:37 mysqld_safe Logging to '/home/mysql/data/mysqld.log'.
151023 13:01:37 mysqld_safe Starting mysqld daemon with databases from /home/mysql/data

[mysql@localhost data]$ tail -f mysqld.log
2015-10-23T05:01:38.114718Z 0 [Note] Plugin 'FEDERATED' is disabled.
2015-10-23T05:01:38.116051Z 0 [Note] InnoDB: Buffer pool(s) load completed at 151023 13:01:38
2015-10-23T05:01:38.118122Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2015-10-23T05:01:38.118780Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2015-10-23T05:01:38.127582Z 0 [Note] IPv6 is available.
2015-10-23T05:01:38.127598Z 0 [Note] - '::' resolves to '::';
2015-10-23T05:01:38.127607Z 0 [Note] Server socket created on IP: '::'.
2015-10-23T05:01:38.143935Z 0 [Note] Event Scheduler: Loaded 0 events
2015-10-23T05:01:38.144134Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.9' socket: '/home/mysql/data/mysql.sock' port: 3306 MySQL Community Server (GPL)

五、登陆并修改临时密码

[mysql@TPCC2 ~]$ mysql -u root -h localhost -p -S /home/mysql/data/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.9

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> ? set password
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> ? alter suer
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> ? alter user
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> alter user 'root'@'localhost' identified by 'mysql';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> exit
Bye

六、测试
1.新密码登陆
[mysql@localhost ~]$ mysql -u root -h localhost -S /home/mysql/data/mysql.sock -pmysql
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.9 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
2.查看sys库
mysql> use sys
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------------------------------------+
| Tables_in_sys |
+-----------------------------------------------+
| host_summary |
| host_summary_by_file_io |
| host_summary_by_file_io_type |
| host_summary_by_stages |
| host_summary_by_statement_latency |
| host_summary_by_statement_type |
| innodb_buffer_stats_by_schema |
| innodb_buffer_stats_by_table |
| innodb_lock_waits |
| io_by_thread_by_latency |
| io_global_by_file_by_bytes |
| io_global_by_file_by_latency |
| io_global_by_wait_by_bytes |
| io_global_by_wait_by_latency |
| latest_file_io |
| memory_by_host_by_current_bytes |
| memory_by_thread_by_current_bytes |
| memory_by_user_by_current_bytes |
| memory_global_by_current_bytes |
| memory_global_total |
| metrics |
| processlist |
| ps_check_lost_instrumentation |
| schema_auto_increment_columns |
| schema_index_statistics |
| schema_object_overview |
| schema_redundant_indexes |
| schema_table_lock_waits |
| schema_table_statistics |
| schema_table_statistics_with_buffer |
| schema_tables_with_full_table_scans |
| schema_unused_indexes |
| session |
| session_ssl_status |
| statement_analysis |
| statements_with_errors_or_warnings |
| statements_with_full_table_scans |
| statements_with_runtimes_in_95th_percentile |
| statements_with_sorting |
| statements_with_temp_tables |
| sys_config |
| user_summary |
| user_summary_by_file_io |
| user_summary_by_file_io_type |
| user_summary_by_stages |
| user_summary_by_statement_latency |
| user_summary_by_statement_type |
| version |
| wait_classes_global_by_avg_latency |
| wait_classes_global_by_latency |
| waits_by_host_by_latency |
| waits_by_user_by_latency |
| waits_global_by_latency |
| x$host_summary |
| x$host_summary_by_file_io |
| x$host_summary_by_file_io_type |
| x$host_summary_by_stages |
| x$host_summary_by_statement_latency |
| x$host_summary_by_statement_type |
| x$innodb_buffer_stats_by_schema |
| x$innodb_buffer_stats_by_table |
| x$innodb_lock_waits |
| x$io_by_thread_by_latency |
| x$io_global_by_file_by_bytes |
| x$io_global_by_file_by_latency |
| x$io_global_by_wait_by_bytes |
| x$io_global_by_wait_by_latency |
| x$latest_file_io |
| x$memory_by_host_by_current_bytes |
| x$memory_by_thread_by_current_bytes |
| x$memory_by_user_by_current_bytes |
| x$memory_global_by_current_bytes |
| x$memory_global_total |
| x$processlist |
| x$ps_digest_95th_percentile_by_avg_us |
| x$ps_digest_avg_latency_distribution |
| x$ps_schema_table_statistics_io |
| x$schema_flattened_keys |
| x$schema_index_statistics |
| x$schema_table_lock_waits |
| x$schema_table_statistics |
| x$schema_table_statistics_with_buffer |
| x$schema_tables_with_full_table_scans |
| x$session |
| x$statement_analysis |
| x$statements_with_errors_or_warnings |
| x$statements_with_full_table_scans |
| x$statements_with_runtimes_in_95th_percentile |
| x$statements_with_sorting |
| x$statements_with_temp_tables |
| x$user_summary |
| x$user_summary_by_file_io |
| x$user_summary_by_file_io_type |
| x$user_summary_by_stages |
| x$user_summary_by_statement_latency |
| x$user_summary_by_statement_type |
| x$wait_classes_global_by_avg_latency |
| x$wait_classes_global_by_latency |
| x$waits_by_host_by_latency |
| x$waits_by_user_by_latency |
| x$waits_global_by_latency |
+-----------------------------------------------+
101 rows in set (0.00 sec)

mysql 5.7.9(GA) 安装的更多相关文章

  1. mysql学习之-三种安装方式与版本介绍

    MYSQL版本介绍 mysql分alpha,beta,rc,GA四个版本. alpha  暗示这是一个以展示新特性为目的的版本,存在比较多的不稳定因素,还会向代码中添加新新特性beta 以后的beta ...

  2. MySQL的Master/Slave群集安装和配置

    本文介绍MySQL的Master/Slave群集安装和配置,版本号安装最新的稳定版GA 5.6.19. 为了支持有限HA.我们用Master/Slave读写简单孤立的集群.有限HA这是当Master不 ...

  3. 记:MySQL 5.7.3.0 安装 全程截图

    前言: 下一个班快讲MySQL数据库了,正好把服务器里面的MySQL卸了重装了一下. 截个图,作为笔记.也正好留给需要的朋友们. 目录: 下载软件 运行安装程序 安装程序欢迎界面 许可协议 查找更新 ...

  4. Ubuntu MYSQL和Windows MYSQL (非C盘安装)

    1.Ubuntu 默认安装 Mysql 5.6版本以上: 1.查看系统是否安装mysql 数据库: sudo netstat -tap | grep mysql 如果安装了,就查看一下版本命令: my ...

  5. 彻底解决mysql中文乱码的办法,修改mysql解压缩版(免安装版或zip版)字符编码

    MySQL会出现中文乱码的原因不外乎下列几点:1.server本身设定问题,例如server字符编码还停留在latin12.table的语系设定问题(包含character与collation)3.客 ...

  6. MySQL数据库学习笔记(一)----MySQL 5.6.21的安装和配置(setup版)

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...

  7. Linux 下 MySQL 的彻底卸载和安装配置字符集

    前言: Linux环境下MySQL的安装和配置在网上已经有很多教程了.之所以写这篇文章是因为在配置字符集的时候找了网上的一些教程发现并不能用导致折腾了一阵子.下面的教程均是亲自实践. MySQL的彻底 ...

  8. Mysql的cmake编译与安装

    Mysql的cmake编译与安装 实验准备环境: 我的操作系统是centos6.6 编译安装MariaDB之前,我们需要准备一些需要的环境 1.开发包组套件 [root@node19 ~]# yum ...

  9. MySQL 5.7.9 免安装配置

    MySQL 5.7.9 免安装配置 环境:win10 64位 mysql版本:mysql-5.7.9-winx64.zip (http://dev.mysql.com/downloads/mysql/ ...

随机推荐

  1. IDEA启动自动进入最后一个项目

    每次打开IDEA的时候总会加载上级最后打开的工程,可能这个工程并不是我需要的,我就得重新去打开我需要的工程,感觉这一点非常鸡肋. 使用如下方法可以在启动的时候,选择启动哪个工程,而不是直接进入. Fi ...

  2. [翻译]localStorage性能的好坏

    原文地址:Is localStorage performance a problem? 如果说2012年对于web开发世界来说有什么值得记住的事的话,关于localStorage性能的争论一定高居榜首 ...

  3. css、js的相互阻塞

    先决条件:脚本前面存在外部样式 以下试验虽然是在chrome下,但是对于IE8+以及其他浏览器也适用. 1.内联脚本(http://jsbin.com/mudab/1) <!DOCTYPE ht ...

  4. Javascript Array Distinct (array.reduce实现)

    javascript 没有原生的Distinct功能 . (至少现在还没有)但我们可以通过简单的script 自己实现 . Distinct就是把数组中重复出现2次或以上的值给删除掉,确保数组内每个值 ...

  5. ELK( ElasticSearch+ Logstash+ Kibana)分布式日志系统部署文档

    开始在公司实施的小应用,慢慢完善之~~~~~~~~文档制作 了好作运维同事之间的前期普及.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 软件下载地址: https://www.e ...

  6. Altium Designer如何批量修改名称,数值,封装

    方法一: altium里的封装管理库 1,Tools -> Footprint Manager -> ...2,在Component List里选择要改的器件3,在View and Edi ...

  7. A basic Windows service in C++ (CppWindowsService)

    A basic Windows service in C++ (CppWindowsService) This code sample demonstrates creating a basic Wi ...

  8. layer iframe层的使用,传参

    父层 <div class="col-xs-4 text-left" style="padding-left: 50px;"><button ...

  9. HDU-1978How many ways

    Problem Description 这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m).游戏的规则描述如下:1.机器人一开始在棋盘的起始点并有起始点所标有 ...

  10. Codeforce 221 div1

    A 只要打个表就能发现,1,6,8,9的所有排列就可以产生0~6的余数了... 所以...走不下去的时候一定要打表... #define rep(i,n) for(int i=0 ; i<(n) ...