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'.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
mysql-5.6.25.tar 包含两个文件: - mysql-5.6.25.tar.gz Generic Linux (Architecture Independent), Compressed TAR Archive MD5: 37664399c91021abe070faa700ecd0ed -install.txt: 安装方法 首先解压mysql-5.6.25.tar: $ tar xf mysql-5.6.25.tar ------------------ Mysql 源码安装操作: 1. 创建用户 # groupadd mysql # useradd -g -r mysql mysql 2. 解压缩tar包 # tar xf mysql-5.6.25.tar.gz # cd mysql-5.6.25 3. 编译安装 # cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ > -DDEFAULT_CHARSET=gbk \ > -DDEFAULT_COLLATION=gbk_chinese_ci \ > -DENABLED_LOCAL_INFILE=ON \ > -DWITH_INNOBASE_STORAGE_ENGINE=1 \ > -DWITH_FEDERATED_STORAGE_ENGINE=1 \ > -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ > -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock \ > -DWITH_DEBUG=0 \ > -DMYSQL_TCP_PORT=3306 # make # make install 4. 配置以及初始化MySQL # cd /usr/local/mysql 4.1 设置MySQL安装目录的权限 # chown -R mysql:mysql /usr/local/mysql 4.2 初始化MySQL # scripts/mysql_install_db --user=mysql # cp support-files/mysql.server /etc/init.d/mysqld 4.3 重新设置MySQL安装目录的权限(除data目录外,其余所有目录及文件均修改用户为root,组不变) # chown -R root . # chown -R mysql data 4.4 启动mysql_safe # bin/mysqld_safe --user=mysql & 4.5 设置MySQL的root帐号密码 - 自动设置:# ./bin/mysql_secure_installation 或 - 手动置:# ./bin/mysqladmin -u root password '' ------------------ 操作详情参看: https://github.com/Marslo/MyBlog/blob/master/Programming/MySQL/MySQLInstallationBySourceCode.md MySQL6源码安装官方手册: http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html ------------------ 资源为英文,下载请谨慎
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值