あーかいぶすハイディフィニション

ここはもう更新しとらんのじゃ

MySQL 5.7.2 m12 (dev) をインストールしてみた

なんか audit log を出せるとかいう不思議な実装がされたらしいので実験場となっている ServersMan@VPS に入れてみた。

ロケ地:ServersMan@VPS 一番安いプラン
ディストリビューションCentOS 6.4 64bit

rpm をインストールする

だるいので rpm からインストールします。途中で mysql-libs パッケージが yum で導入されちゃってる事を思い出したので、nodeps オプションをつけて依存関係に配慮(大嘘)しつつ削除します。

[root@localhost ~]# wget http://dev.mysql.com/get/Downloads/MySQL-5.7/MySQL-5.7.2-m12-1.el6.x86_64.rpm-bundle.tar/from/http://cdn.mysql.com/
[root@localhost ~]# tar -xvf MySQL-5.7.2-m12-1.el6.x86_64.rpm-bundle.tar
[root@localhost ~]# rpm -e --nodeps mysql-libs
[root@localhost ~]# rpm -ivh MySQL-devel-5.7.2_m12-1.el6.x86_64.rpm
[root@localhost ~]# rpm -ivh MySQL-shared-*
[root@localhost ~]# rpm -ivh MySQL-embedded-5.7.2_m12-1.el6.x86_64.rpm
[root@localhost ~]# rpm -ivh MySQL-server-5.7.2_m12-1.el6.x86_64.rpm
[root@localhost ~]# rpm -ivh MySQL-client-5.7.2_m12-1.el6.x86_64.rpm
[root@localhost ~]# rpm -ivh MySQL-test-5.7.2_m12-1.el6.x86_64.rpm
MySQL-server-5.7.2_m12-1.el6.x86_64.rpm を入れた時の警告
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

5.6はどうだったか思い出せないけど、どうもインストールした直後の root ユーザがパスワード未設定はまずいとおもったのか、ランダムなパスワードをインストール時に付与するようになったみたいすね。
今回は「/root/.mysql_secret」に書いてあるよ!と言われています。おっ確かに書いてあるナ、いいゾ〜これ。

試しにログインしてみる
[root@localhost ~]# /etc/init.d/mysql start
[root@localhost ~]# mysql -u root -p
Enter password: (/root/.mysql_secret に書いてあるランダムなパスワード)
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.2-m12

Copyright (c) 2000, 2013, 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>

やったぜ。