zzw原创_Red Hat Enterprise Linux Server release 6.5 安装mysql5.5.28版本
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:关闭
zzw原创_Red Hat Enterprise Linux Server release 6.5 安装mysql5.5.28版本的更多相关文章
- ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)
OS Info----------# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 5.5 (Tikanga)# cat ...
- 安装GCC for Red Hat Enterprise Linux Server release 6(64位)
http://www.cnblogs.com/emanlee/archive/2012/08/11/2633895.html
- 更换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 ...
- Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)
新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...
- Red Hat Enterprise Linux AS release 4 yum源
$sudo vim /etc/yum.conf [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpoli ...
- 解决问题:Red Hat Enterprise Linux 7 64 位 虚拟机安装后无法启动图形化
原因: 1.系统在创建时,没有安装图形化 2.系统在安装后,有降低内存的操作,内存过低无法启动桌面,以及其他 就原因一进行图形化安装: 1.VMware挂载Red Hat Enterprise Lin ...
- Red Hat Enterprise Linux Server 6.5安装GCC 4.9.2
现在很多程序员都应用GCC,怎样才能更好的应用GCC.目前,GCC可以用来编译C/C++.FORTRAN.JAVA.OBJC.ADA等语言的程序,可根据需要选择安装支持的语言.本文以在RedHat L ...
- linux上源码编译安装mysql-5.6.28
在 linux 上编译安装 mysql-.tar.gz http://www.mysql.com/ mysql下载地址: http://www.mysql.com/downloads/mysql/#d ...
- Red Hat Enterprise Linux Server 5.5新增功能简介
一.概况 昨日对刚发布的redhat新产品RHEL5.5进行了小范围的测试,红帽企业版 Linux 5.5 发行本中的亮点包括针对 Intel Boxboro-EX 平台.AMD Magny-Cour ...
随机推荐
- MRO和C3算法
本节主要内容: 1.python多继承 2.python经典类的MRO 3.python新式类的MRO,C3算法 4.super() 一.python多继承 在python中类与类之间可以有继承关系, ...
- jquery事件重复绑定的几种解决方法 (二)
防止事件重复绑定共有4种方法: bind().unbind()方法 live().die()方法 off().on()方法 one()方法 一.bind().unbind()方法 bind();绑定事 ...
- _event_team
EventId 事件ID TeamId 事件玩家分组,仅传送(0为联盟 1为部落)对线(防守为1,进攻为2),自定义阵营(_faction表自定义阵营ID),公会(公会guid) TeamName 事 ...
- Hash——字符串匹配(求s1在s2中出现的次数)
题目描述: 这是一道模板题. 给定一个字符串 A 和一个字符串 B ,求 B 在 A 中的出现次数.A 和 B中的字符均为英语大写字母. 求A 在 B 中出现了几次.(可重叠) 样例输入: 3 BA ...
- zipkin启动报错(Caused by: java.lang.ClassNotFoundException: zipkin.Component)的解决方法
使用ziplin依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifact ...
- linux中date命令显示
1. date用来显示具体的日期和24进制的时间 [jasmine.qian@ ~]$ date Fri Jan 25 14:17:17 CST 2019 [jasmine.qian@ ~]$ dat ...
- 学习笔记4-pathon的range()函数和list()函数
使用python的人都知道range()函数很方便,今天再用到他的时候发现了很多以前看到过但是忘记的细节.这里记录一下range(),复习下list的slide,最后分析一个好玩儿的冒泡程序. 这里记 ...
- VC工程编译相关
①error C4996: 'sprintf': This function or variable may be unsafe 这不是语法的错误,而是IDE默认禁止这种容易产生漏洞的旧函数,解决的方 ...
- 算法笔记--斜率优化dp
斜率优化是单调队列优化的推广 用单调队列维护递增的斜率 参考:https://www.cnblogs.com/ka200812/archive/2012/08/03/2621345.html 以例1举 ...
- 雷林鹏分享:C# 程序结构
C# 程序结构 在我们学习 C# 编程语言的基础构件块之前,让我们先看一下 C# 的最小的程序结构,以便作为接下来章节的参考. C# Hello World 实例 一个 C# 程序主要包括以下部分: ...