CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了centos6.6安装mysql5.7.9tar包大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

一.使用工具:    1.vmware10虚拟机    2.centos 6.6    3.secureCRT 二.系统设置:   1.安装文件下载目录:/home/tools/   2.mysql安装目录:/usr/local/mysql 三.文件下载:   http://downloads.mysql.com/archives/get/file/mysql-5.7.9-linux-glibc2

一.使用工具:

1.vmware10虚拟机

2.centos 6.6

3.secureCRT

二.系统设置:

1.安装文件下载目录:/home/tools/

2.MysqL安装目录:/usr/local/MysqL

三.文件下载:

http://downloads.mysql.com/archives/get/file/mysql-5.7.9-linux-glibc2.5-x86_64.tar

1.在windows系统中下载好tar包,在centos中用rz命令导入到/home/tools/目录中.

2.在centos中使用wget命令下载.

:rz和wget若没有需要安装才可以使用

centos6.6安装mysql5.7.9tar包

四.安装:

1.解压包:tar -zxvf MysqL-5.7.9-linux-glibc2.5-x86_64.tar.gz

centos6.6安装mysql5.7.9tar包


centos6.6安装mysql5.7.9tar包

2.改名并移动:@H_942_17@mv MysqL-5.7.9-linux-glibc2.5-x86_64 /usr/local/MysqL

centos6.6安装mysql5.7.9tar包

3.创建MysqL用户及组:

[root@study local]# id MysqL

id: MysqL: No such user

# useradd -s /sbin/nologin -M MysqL

注:-s:指定用户登入后所使用的sHell。认值为/bin/bash。

  -M:不要自动建立用户的登入目录。

4.修改权限创建data:

# mkdir /usr/local/MysqL/data

# cd /usr/local

# chown -R MysqL:MysqL /usr/local/MysqL -R:递归,改变目录及目录下文件权限

centos6.6安装mysql5.7.9tar包

5.安装:

[root@study MysqL]# ./bin/MysqLd --initialize --user=MysqL --basedir=/usr/local/MysqL --datadir=/usr/local/MysqL/data

centos6.6安装mysql5.7.9tar包

把临时密码记录下来,初次登陆会用到:/lxW+2<(9jk:

配置ssl@L_801_34@:

[root@study MysqL]# bin/MysqL_ssl_rsa_setup --datadir=/usr/local/MysqL/data

centos6.6安装mysql5.7.9tar包

6.MysqL配置:

[root@study MysqL]# cd support-files/

#cp my-default.cnf /etc/my.cnf

#cp MysqL.server /etc/init.d/MysqL

centos6.6安装mysql5.7.9tar包

7.设置环境变量:

[root@study support-files]# vim /etc/profile

文件最后一行添加:export PATH=/usr/local/MysqL/bin:$PATH

wq保存退出

[root@study support-files]# source /etc/profile 环境变量生效

8.设置开机启动:

# chkconfig MysqL on

# chkconfig|grep MysqL

centos6.6安装mysql5.7.9tar包

9.登陆测试:

查看是否有MysqL进程:#ps -ef|grep MysqL

#service MysqL start

#MysqL -uroot -p 回车后粘贴之前记录下来的临时密码,登陆成功

centos6.6安装mysql5.7.9tar包

初次使用要修改临时密码

centos6.6安装mysql5.7.9tar包


:修改密码

MysqL> set password=password('A123456');

MysqL授权:

MysqL> grant all privileges on *.* to root@'%' identified by 'A123456';

更新权限:

MysqL> flush privileges;


centos6.6安装mysql5.7.9tar包


centos6.6安装mysql5.7.9tar包

已经可以正常使用.

大佬总结

以上是大佬教程为你收集整理的centos6.6安装mysql5.7.9tar包全部内容,希望文章能够帮你解决centos6.6安装mysql5.7.9tar包所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。