Mysql 5.6安装笔记

本文详细介绍了Mysql-5.6.25版本的安装过程,包括解压、检测旧版本、安装关键组件以及初次使用时的密码设置和重要操作说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

记录一下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'.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值