1、查看系统版本

[root@ip12189 ~]#  more /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m

2、到https://downloads.mysql.com/archives/community/ 下载mysql5.5.28版本

我将以下文件都下了

MySQL-client-5.5.28-1.el6.x86_64.rpm
    MySQL-devel-5.5.28-1.el6.x86_64.rpm
    MySQL-embedded-5.5.28-1.el6.x86_64.rpm
    MySQL-server-5.5.28-1.el6.x86_64.rpm
    MySQL-shared-5.5.28-1.el6.x86_64.rpm
    MySQL-shared-compat-5.5.28-1.el6.x86_64.rpm
    MySQL-test-5.5.28-1.el6.x86_64.rpm

3、以root用登录linux

[root@ip12189 mysql_5.5.28]# rpm -ivh   *.rpm
Preparing...                ########################################### [100%]
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.28-1.el6.x86_64 conflicts with file from package mysql-community-common-5.7.18-1.el7.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.5.28-1.el6.x86_64 conflicts with file from package mysql-community-common-5.7.18-1.el7.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.28-1.el6.x86_64 conflicts with file from package mysql-community-common-5.7.18-1.el7.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.28-1.el6.x86_64 conflicts with file from package mysql-community-common-5.7.18-1.el7.x86_64

产生冲突了

4、解决冲突

[root@ip12189 mysql_5.5.28]# rpm -e --nodeps   mysql-community-common-5.7.18-1.el7.x86_64

5、再来一次

[root@ip12189 mysql_5.5.28]# rpm -ivh   *.rpm
Preparing...                ########################################### [100%]
1:MySQL-devel            ########################################### [ 14%]
2:MySQL-client           ########################################### [ 29%]
3:MySQL-test             ########################################### [ 43%]
4:MySQL-embedded         ########################################### [ 57%]
5:MySQL-shared-compat    ########################################### [ 71%]
6:MySQL-shared           ########################################### [ 86%]
7:MySQL-server           ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ip12189 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

6、再上面的提示修改root密码

[root@ip12189 mysql_5.5.28]# /usr/bin/mysqladmin -u root password root199
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

报错了,出现这个问题的原因是:

由于mysql的socket文件是由mysqld服务启动时创建的,如果mysqld服务未正常启动,socket文件自然也不会被创建,当然会找不到socket文件了。

所以要先启动mysql

7、查看安装在哪里

[root@ip12189 ~]# whereis mysql

mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

8、rpm包安装的MySQL是不会安装/etc/my.cnf文件

解决方法:

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

9、试着启动

[root@ip12189 mysql_5.5.28]# service mysqld start
mysqld: 未被识别的服务

解决方法

[root@ip12189 init.d]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@ip12189 init.d]# cd  /
[root@ip12189 /]# find  .  -name  mysql.server
./usr/share/mysql/mysql.server
[root@ip12189 /]# cp /usr/share/mysql/mysql.server  /etc/init.d/mysqld
[root@ip12189 /]# service mysqld start
Starting MySQL...                                          [确定]

解决了

10、再来修改root密码

[root@ip12189 mysql_5.5.28]# /usr/bin/mysqladmin -u root password root2222299

OK了,没出错提示了

11、再试另一句

[root@ip12189 mysql_5.5.28]# /usr/bin/mysqladmin -u root -h ip12189 password  root2222299

/usr/bin/mysqladmin: connect to server at 'ip12189' failed
error: 'Unknown MySQL server host 'ip12189' (110)'
Check that mysqld is running on ip12189 and that the port is 3306.
You can check this by doing 'telnet ip12189 3306'

看来这个步骤不要

12、连一下看看

[root@ip12189 /]# mysql  -u root  -p  
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.5.28-log MySQL Community Server (GPL)

Copyright (c) 2000, 2012, 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> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql>

成功了

------附录

1、查看mysqld服务是否已添加到linux
     命令:#chkconfig --list mysqld
     已添加提示:mysql           0:关闭   1:关闭   2:关闭   3:关闭   4:关闭    5:启用   6:关闭

转载于:https://www.cnblogs.com/zzw-zyba/p/7156517.html

zzw原创_Red Hat Enterprise Linux Server release 6.5 安装mysql5.5.28版本相关推荐

  1. Red Hat Enterprise Linux Server release 5.6 安装 MongoDB 2.6.4

    1:下载 [jifeng@jifeng04 ~]$ wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz --2 ...

  2. Red Hat Enterprise Linux Server release 6.3下ganglia监控系统的搭建

    ganglia 是分布式的监控系统,有两个Daemon, 分别是:客户端Ganglia Monitoring Daemon (gmond)和服务端Ganglia Meta Daemon (gmetad ...

  3. Red Hat Enterprise Linux Server release 7.0双系统安装

    2019独角兽企业重金招聘Python工程师标准>>> Red Hat Enterprise Linux Server release 7.0双系统安装 1.RedHat 公司的企业 ...

  4. Red Hat Enterprise Linux Server release 7.4 (Maipo) 安装mysql5.7.36

    1. 版本 [root@localhost mysql]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (M ...

  5. Red Hat Enterprise Linux Server release 7.1 (Maipo) 安装gcc 的几种方式

    linux中没有默认安装的gcc,折腾了一番,终于搞好,记录备忘. [root@localhost local]# gcc bash: gcc: command not found... 查看系统版本 ...

  6. Red Hat Enterprise Linux Server 7.3 离线安装Podman

    Background 上次Ubuntu离线安装Podman,今天在RHEL 7上再离线安装下. http://rpmfind.net/linux/rpm2html/search.php?query=p ...

  7. 1-4-RHEL6.3-用户及组管理(Red Hat Enterprise Linux Server release 6.3)@树袋飘零

    本节介绍内容: 1.账户和组的概念 2.账户和组文件阐述与解析 3.管理账户和组(创建删除和修改) 4.案例分析-用户管理和组管理 5.暴力破解RHEL5 shadow 1.账户和组的概念 用户和组的 ...

  8. AWS EC2 云服务器 Red Hat Enterprise Linux Server release 7.4 (Maipo) vnc远程连接教程

    1.AWS亚马逊云端设置完全访问组TCP连接端口 2.使用xshell登录隧道转发5901端口 选择私有认证秘钥 点击隧道进行配置 3.下载安装redhat 7.4  gnome及配置 #yum up ...

  9. linux redhate7 yum源,更换Red Hat Enterprise Linux 7 64位的yum为centos的版本

    查看redhat原有的yum包有哪些: [root@localhost ~]# rpm -qa|grep yum yum-utils-1.1.31-24.el7.noarch yum-langpack ...

最新文章

  1. 吴恩达机器学习笔记 —— 9 神经网络学习
  2. bootstrap fileinput上传返回400,404,500 等错误替换
  3. 首次使用计算机鼠标键盘不能用,解决方案:如何解决无法使用计算机鼠标和键盘的问题?如果启动后无法使用鼠标和键盘该怎么办?...
  4. python3读取excel数据-python3 读取Excel表格中的数据
  5. Uploadify——学习(1):在Struts2的使用
  6. 软件测试要经过哪几个阶段?
  7. 自己定义AlertDialog对话框布局
  8. 产品经理处理问题“五步法”模板
  9. VC 中一些控件的使用方法(TabControl, 工具栏)
  10. 简单的关闭iframe窗口和获取父页面元素
  11. 【读书笔记《Android游戏编程之从零开始》】5.Android 游戏开发常用的系统控件(ProgressBar、Seekbar)
  12. java电商网站源码_java 的电商系统的完整源码+文档
  13. 计算机操作系统第六章测试题及答案
  14. JVM(1.8)GC日志解析与分析
  15. Exception | This means that said other beans do not use the final version of the bean. This is often
  16. mysql nemesis后缀,YOUR FILES ARE ENCRYPTED
  17. 服务器机房消防系统,服务器机房消防系统和维护
  18. 功放限幅保护_更改限幅电路的功放清单
  19. 360全景拍摄方式总结:360度全景拍摄有哪些种类?
  20. 使用stm32产生三角波和正弦波

热门文章

  1. 生存游戏计算机,像素生存游戏2电脑版
  2. Mybatis(第二篇:联表查询)
  3. 100种思维模型之思维投影思维模型-51
  4. Python编程之员工奖金
  5. 谷歌组件开发初尝试--Chrome Extensions
  6. WinDebug相关
  7. 《计算机组装与维护》课程设计报告(二)
  8. 火箭队再遭伤病打击 曝中锋卡佩拉至少缺阵1月
  9. 英特尔服务器新消息,英特尔10nm Ice Lake-SP服务器处理器或将延迟到2021年第一季度...
  10. 如何用纯js做一个大富翁游戏