1、首先查看linux版本:cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.2 (Maipo)

2.Linux查看版本说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit):

getconf LONG_BIT

64.

3.关闭防护墙
查看:
chkconfig --list | grep iptables

chkconfig iptables off (设置自动启动为关闭)

(# chkconfig --del iptables (移除开机自动启动))

4.当官方网站上下载对应的mysql, 根据上面信息

https://dev.mysql.com/downloads/mysql/5.5.html?os=31&version=5.1

下载(mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar)

bundle版本的 是要安装的全部包括了,方便

5.用 ssh 工具上次的linux 上对应一个文件

[root@node04 Downloads]# ll
total 235312
-rw-r--r-- 1 root root 172994560 Oct 21 15:33 MySQL-5.5.58-1.el7.x86_64.rpm-bundle.tar

6. 注意:的是要切换的root用户  使用 su root切换用户

解压之后就是出现了好多的rpm文件

解压mysql5.5的安装包

tar -xvf MySQL-5.5.39-2.el6.x86_64.rpm-bundle.tar

但是安装只需要需要如下几个文件:

[root@node04 Downloads]# ll
-rw-r--r-- 1 7155 31415 16025016 Sep 14 14:24 MySQL-client-5.5.58-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 4394260 Sep 14 14:24 MySQL-devel-5.5.58-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 47529380 Sep 14 14:24 MySQL-server-5.5.58-1.el7.x86_64.rpm

7. 利用 rpm  安装 文件

rpm  -ivh   MySQL-client-5.5.58-1.el7.x86_64.rpm

rpm  -ivh   MySQL-devel-5.5.58-1.el7.x86_64.rpm

rpm  -ivh  MySQL-server-5.5.58-1.el7.x86_64.rpm

8. 接着就是初始化数据库。十分简单

/usr/bin/mysql_install_db

如图:

9.接下来就是查看mysql的状态

service mysql status

可能是应为 有进程在占用 ,或者 磁盘已满 (查看命令df -h)

查看进程:netstat -anp | grep mysql

将里面 启动的进程杀死 。  kill -9  进程id

11. 启动一下

/etc/init.d/mysql start

[root@node04 Downloads]# /etc/init.d/mysql start
Starting MySQL SUCCESS!

12.进入mysql

[root@node04 Downloads]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.58 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> update mysql.user set password=PASSWORD('xxxxx') where user='root';   --将root 的密码改为 xxxx  (xxxx 是你自己设置的密码)
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4 Changed: 4 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on *.* to root@'%' identified by '123456' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES
-> ;
Query OK, 0 rows affected (0.00 sec)

mysql> exit

-- 本地登录一下,可以,远程登录也可以

[root@node04 Downloads]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 144
Server version: 5.5.58 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

好的,安装成功!

Red Hat7.2 上安装 MySQL5.5.58的更多相关文章

  1. 在 CentOS7 上安装 MySQL5.7

    在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建 ...

  2. 在centos上安装mysql5.7的三种方法

    带OS信息的是已编译的二进制文件,不带OS信息的是源码包 mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz 二进制包 mysql-5.5.51.tar.gz 源码包 ...

  3. CentOS 6.9上安装mysql-5.6.36

    CentOS 6.9上安装mysql-5.6.36 1.准备数据存放的文件系统 新建一个逻辑卷,并将其挂载至特定目录即可.这里不再给出过程. 这里假设其逻辑卷的挂载目录为/data,而后需要创建/da ...

  4. CentOS6.7上安装Mysql5.7

    CentOS6.7上安装Mysql5.7 2017年07月22日 18:27:05 阅读数:564 环境的配置总是令人作呕,所以这次表明版本条件: 首先,这是一台新机器 其次,CentOS版本如下: ...

  5. 通过xshell在linux上安装mysql5.7(终极版)

    通过xshell在linux上安装mysql5.7(终极版) 0)通过xshell连接到远程服务器 1)彻底删除原来安装的mysql 首先查看:rpm -qa|grep -i mysql 删除操作(一 ...

  6. CentOS 6.9上安装mysql-5.6.37

    CentOS 6.9上安装mysql-5.6.37 1.准备数据存放的文件系统 新建一个逻辑卷,并将其挂载至特定目录即可.这里不再给出过程. 这里假设其逻辑卷的挂载目录为/data,而后需要创建/da ...

  7. linux上安装mysql5.6

    CentOS-6.6+MySQL-5.6 部署环境操作系统:CentOS-6.6-x86_64-bin-DVD1.isoMySQL 版本:mysql-5.6.26.tar.gz操作用户:root系统 ...

  8. 在CentOS6.8系统上安装MySQL5.7(转)

    mysql-57">如何在CentOS 6.8系统上安装MySQL 5.7? 一.检查系统上是否已经安装MySQL 命令: ? 1 2 3 4 5 [root@localhost ~] ...

  9. mac os 10.10.4 上安装mysql5.6.26

    在 Mac 系统上, 安装 MySQL Server 通常是用 DMG 包在图形化界面下按提示安装, 此外 MySQL 还提供了 Compressed TAR Archive 二进制包安装方式, 即免 ...

随机推荐

  1. react常用模块介绍

    react各个模块: 1.node.js自带的模块(原生模块):https://www.jianshu.com/p/abc72267abfc原生模块的api文档地址:http://nodejs.cn/ ...

  2. spring mvc 返回乱码SpringMVC使用@ResponseBody注解返回中文字符串乱码的问题

    原文地址:https://www.cnblogs.com/fzj16888/p/5923232.html 先说一下我的经历,以及解决问题的而过程. 在使用SpringMVC的时候,最开始的时候在配置文 ...

  3. noip 1998 洛谷P1013 进制位

    题目描述 著名科学家卢斯为了检查学生对进位制的理解,他给出了如下的一张加法表,表中的字母代表数字. 例如: L K V E L L K V E K K V E KL V V E KL KK E E K ...

  4. MySQL C API的一个让我头疼的问题,获得一行记录中包括NULL

    遇到过几次错误,通过gdb来查看错误对战,发现错误居然是atoi调用出错,除非atoi(NULL) 才会报这种错误.说明 row[0]==NULL. (gdb) bt #0 0x00007f82c66 ...

  5. Server 2008 R2大改造变成梦幻Win7系统

    在此之前先补充一下知识Windows Server 2008和Windows Server 2008 R2的不同之处Windows Server 2008是基准与Vista的内核构建的,支持X86框架 ...

  6. [leetcode]Sort Colors @ Python

    原题地址:https://oj.leetcode.com/problems/sort-colors/ 题意: Given an array with n objects colored red, wh ...

  7. Mediator 中介者 MD

    中介者模式 简介 用一个中介者对象封装一系列的对象交互,中介者使各对象不需要显示地相互作用,从而使耦合松散,而且可以独立地改变它们之间的交互. 中介者模式也称为调解者模式或者调停者模式. 当程序存在大 ...

  8. java 反射机制--根据属性名获取属性值

    1.考虑安全访问范围内的属性,没有权限访问到的属性不读取 /** * 根据属性名获取属性值 * * @param fieldName * @param object * @return */ priv ...

  9. 使用numba加速python程序

    前面说过使用Cython来加速python程序的运行速度,但是相对来说程序改动较大,这次就说一种简单的方式来加速python计算速度的方法,就是使用numba库来进行,numba库可以使用JIT技术即 ...

  10. centos下配置sftp且限制用户访问目录

    SFTP在Linux下是一个很方便很安全的文件传输工具,我常常用它在Linux服务器上替代传统的ftp来传输文件.众所周知SFTP账号是基于SSH账号的,默认情况下访问服务器的权限很大,下面的教程就是 ...