MySQL 5.7.10最新版本源代码安装详细过程(2)

2015-12-17T09:48:07.807878Z 0 [Warning] Noexisting UUID has been found, so we assume that this is the first time thatthis server has been started. Generating a new UUID: 46bcea55-a4a3-11e5-b7ee-000c29ff8c77.

2015-12-17T09:48:07.809546Z 0 [Warning]Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot beopened.

2015-12-17T09:48:07.811257Z 1 [Note] Atemporary password is generated for root@localhost: 4e3taITlXU%/

[root@linuxidc bin]#

PS:看到这里有一个初始化root密码,记下来,不然启动完后,mysql登录就报密码错误登录不了。

10,安装ssl
[root@linuxidc bin]#./mysql_ssl_rsa_setup

Generating a 2048 bit RSA private key

..........+++

.................................................................................+++

writing new private key to 'ca-key.pem'

-----

Generating a 2048 bit RSA private key

..+++

..................................................................................................................................................................+++

writing new private key to 'server-key.pem'

-----

Generating a 2048 bit RSA private key

.......................................................................+++

..+++

writing new private key to 'client-key.pem'

-----

[root@linuxidc bin]#

11,部署启动服务
准备服务:

[root@linuxidc bin]# cp../support-files/mysql.server /etc/init.d/mysqld5710

[root@linuxidc bin]# chmod 700/etc/init.d/mysqld5710

[root@linuxidc bin]# echo"export PATH=$PATH:/usr/local/mysql5710/bin">>/etc/profile

[root@linuxidc bin]# source/etc/profile

[root@linuxidc bin]#

设置开机启动

[root@linuxidc bin]# chkconfigmysqld5710 on

[root@linuxidc bin]#

启动报错:

[root@linuxidc bin]# servicemysqld5710 start

Starting MySQL....The server quit withoutupdating PID file[失败]/local/mysql5710/mysqld.pid).

[root@linuxidc bin]#

查看后台报错日志mysqld.log:

2015-12-17T09:54:40.004720Z 0 [ERROR]InnoDB: redo log file './ib_logfile0' exists. Creating system tablespace withexisting redo log files is not recommended. Please delete all redo log file

s before creating new system tablespace.

2015-12-17T09:54:40.004744Z 0 [ERROR]InnoDB: InnoDB Database creation was aborted with error Generic error. You mayneed to delete the ibdata1 file before trying to start up again.

2015-12-17T09:54:40.305233Z 0 [ERROR]Plugin 'InnoDB' init function returned error.

2015-12-17T09:54:40.305292Z 0 [ERROR]Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2015-12-17T09:54:40.305305Z 0 [ERROR]Failed to initialize plugins.

2015-12-17T09:54:40.305315Z 0 [ERROR]Aborting

2015-12-17T09:54:40.305333Z 0 [Note] Binlogend

2015-12-17T09:54:40.306240Z 0 [Note]/usr/local/mysql5710/bin/mysqld: Shutdown complete

解决办法:

[root@linuxidc data]# rm -rfib_logfile0 ib_logfile1

[root@linuxidc data]#

然后再启动mysql,有报错信息如下:

2015-12-17T10:02:46.169594Z 0 [Warning] InnoDB: Cannot open tablemysql/plugin from the internal data dictionary of InnoDB though the .frm filefor the table exists. Please refer to

v.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how toresolve the issue.

mysqld: Table 'mysql.plugin' doesn't exist

2015-12-17T10:02:46.169680Z 0 [ERROR] Can't open the mysql.plugintable. Please run mysql_upgrade to create it.

2015-12-17T10:02:46.169907Z 0 [ERROR] unknown variable'max_connection=10000'

2015-12-17T10:02:46.169928Z 0 [ERROR] Aborting

修改my.cnf里面,注释掉max_connection=10000即可。后面陆陆续续报如下错误

2015-12-17T10:07:22.243181Z 0 [ERROR]unknown variable 'max_user_connection=3009'

2015-12-17T10:16:15.870396Z 0 [ERROR]unknown variable 'thread_concurrency=8'

2015-12-17T10:16:51.251271Z 0 [ERROR]unknown option '--myisam_recover'

然后全部在my.cnf里面注释掉,再启动mysqld服务,正常启动了,如下所示:

[root@linuxidc mysql5710]# servicemysqld5710 start

Starting MySQL..                                          [确定]

[root@linuxidc mysql5710]#

至此,mysql5.7.10安装部署成功了。

12,重置密码
利用mysqladmin重置密码

[root@linuxidc mysql5710]#./bin/mysqladmin -h localhost -uroot password "root" -p'4e3taITlXU%/'--socket=/usr/local/mysql5710/mysql.sock

mysqladmin: [Warning] Using a password onthe command line interface can be insecure.

Warning: Since password will be sent toserver in plain text, use ssl connection to ensure password safety.

[root@linuxidc mysql5710]#

使用新密码登录:

[root@linuxidc mysql5710]# mysql--socket=/usr/local/mysql5710/mysql.sock -uroot -proot

Warning: Using a password on the commandline interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 7

Server version: 5.7.10-log Sourcedistribution

Copyright (c) 2000, 2013, Oracle and/or itsaffiliates. All rights reserved.

Oracle is a registered trademark of OracleCorporation and/or its

affiliates. Other names may be trademarksof their respective

owners.

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

mysql>

OK,mysql5.7.10安装彻底结束了,下面就可以开始验证5.7的新特性了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/2c21c9027e0d4ba1deff1e5c3a99bd10.html