Mysql 5.6安装笔记

记录一下Mysql的安装,首先我这里得版本是MySQL-5.6.25-1.el6.x86_64.rpm-bundle.tar,针对这个进行解压

#解压
tar -xf MySQL-5.6.25-1.el6.x86_64.rpm-bundle.tar
#检测是否存在老版本的Mysql
rpm -qa | grep -i mysql
#一般默认是存在的,如果不存在这一步可以忽略,比如我这的版本是mysql-libs-5.1.73-3.el6_5.x86_64
rpm -e --nodeps mysql-libs-5.1.73-3.el6_5.x86_64
#删除完成后进行安装
#针对解压出来的包进行安装,大致只用安装如下包
rpm -ivh MySQL-client-5.6.25-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.6.25-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.25-1.el6.x86_64.rpm



#安装完MySQL-server之后会出现一下类容
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 at http://bugs.mysql.com/


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

第一次进入时需要修改密码,通过初始密码进入之后可以通过这条语句进行设置密码 set password =password('slave01_mysql‘);

以上大致是一些介绍的内容,在5.6Mysql的安装的root密码是随机生成的,通过上面的内容得知Mysql root密码是在这个里面'/root/.mysql_secret'.

你可能感兴趣的:(Mysql 5.6安装笔记)