Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2802732
  • 博文数量: 389
  • 博客积分: 4177
  • 博客等级: 上校
  • 技术积分: 4773
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-16 23:29
文章分类

全部博文(389)

分类: Mysql/postgreSQL

2015-08-16 20:58:17

                                          MySQL 5.7.8 RC安装

      在经历过铺天盖地的宣传后,终于下载了一个5.7的版本过来体验一下。作者下载的是
解压二进制版本


[root@c12 my5.7]# mv mysql-5.7.8-rc-linux-glibc2.5-x86_64 /usr/local/mysql57

改权限
[root@c12 local]# chown -R mysql:mysql mysql57

建立数据目录
[root@c12 mysql57]# mkdir data
改权限
[root@c12 mysql57]# chown -R mysql:mysql data

初始化


[root@c12 mysql57]# ./bin/mysql_install_db --datadir=/usr/local/mysql57/data/
2015-08-16 12:38:24 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2015-08-16 12:38:29 [WARNING] The bootstrap log isn't empty:
2015-08-16 12:38:29 [WARNING] mysqld: [Warning] --bootstrap is deprecated. Please consider using --initialize instead

OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
server-cert.pem: OK
client-cert.pem: OK

[root@c12 mysql57]# ./bin/mysqld --initialize  --datadir=/usr/local/mysql57/data/
2015-08-16T12:42:43.786439Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-16T12:42:45.023771Z 0 [Warning] InnoDB: New log files created, LSN=45790
2015-08-16T12:42:45.185491Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-08-16T12:42:45.249450Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 4af85fb4-4414-11e5-8bf6-50e5493af943.
2015-08-16T12:42:45.324891Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-08-16T12:42:45.325080Z 0 [Warning] Failed to setup SSL
2015-08-16T12:42:45.325138Z 0 [Warning] SSL error: SSL context is not usable without certificate and private key
2015-08-16T12:42:45.326221Z 1 [Warning] A temporary password is generated for root@localhost: ,hPKg6j;x?kX

5.7中为root设置为一个默认密码,本例中是 ,hPKg6j;x?kX

启动
[root@c12 mysql57]# chown -R mysql:mysql data
[root@c12 mysql57]# ./bin/mysqld_safe --basedir=/usr/local/mysql57 --datadir=/usr/local/mysql57/data/
150816 12:45:33 mysqld_safe Logging to '/usr/local/mysql57/data//c12.fb.com.err'.
150816 12:45:33 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql57/data/

进入mysql后,第一件事件就是要你改默认密码
[root@c12 mysql57]# ./bin/mysql -u root -p

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> alter user root identified by 'root';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

使用mysqladmin总算能改了
[root@c12 mysql57]# ./bin/mysqladmin -u root -p password
Enter password:
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.8-rc  |
+-----------+
1 row in set (0.00 sec)
 

阅读(6085) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~