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. smarty 中时间格式化的用法

    大家都知道PHP中输出时间和日期可以用 date("Y-m-d H:i:s",时间戳)  , 但是在smarty模板中,$time|date_format:'%Y-%m-%d %H ...

  2. OpenStack REST API使用

    以前一直想写博客,但因各种因素一直没写.最近在做OpenStack,而OpenStack对外提供REST API,今天就简要介绍一下OpenStack REST API 使用,关于什么是REST AP ...

  3. testng,soket write error错误

    网上解决手段:  testng 工程报错java.net.SocketException SocketException: Software caused connection abort · Iss ...

  4. 存储过程中update,然后用sql%判断update是否成功的存储过程

    --更新用户状态 PROCEDURE P_UPDATE_USER_STATUS ( v_SrcID IN NUMERIC, v_DstID IN NUMERIC, v_DstType IN NUMER ...

  5. Unix和Linux下C语言学习指南

    转自:http://www.linuxdiyf.com/viewarticle.php?id=174074 Unix和Linux下C语言学习指南 引言 尽管 C 语言问世已近 30 年,但它的魅力仍未 ...

  6. SVM详解

    SVM入门(一)至(三)Refresh 按:之前的文章重新汇编一下,修改了一些错误和不当的说法,一起复习,然后继续SVM之旅. (一)SVM的简介 支持向量机(Support Vector Machi ...

  7. How systems researchers build systems

    Define the problem >>Identify the constraints and abstract problem propose solution:simple ide ...

  8. Ubuntu 下对ADT 添加别名(alias)

    1:~$ vim .bashrc 2:在打开的.bashrc文件中加入: alias adt='./adt-bundle-linux-x86-20130729/eclipse/eclipse' 3:保 ...

  9. Oracle 客户端 NLS_LANG 的设置(转)

    1. NLS_LANG 参数组成NLS_LANG参数由以下部分组成:NLS_LANG=<Language>_<Territory>.<Clients Characters ...

  10. CMake快速入门教程-实战

    http://www.ibm.com/developerworks/cn/linux/l-cn-cmake/ http://blog.csdn.net/dbzhang800/article/detai ...