Centos6.9安装Myql数据库RPM包

Centos6.9安装Myql数据库RPM包

1、进入/usr/src目录

[[email protected] nginx-1.12.1]# cd /usr/src/

[[email protected] src]# ls

debug kernels nginx-1.12.1 nginx-1.12.1.tar.gz

2、下载Myql5.7.19的rpm包

[[email protected]****src]#wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

--2017-10-12 11:16:50-- https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

Resolving cdn.mysql.com… 104.95.206.140

Connecting to cdn.mysql.com|104.95.206.140|:443… connected.

HTTP request sent, awaiting response… 200 OK

Length: 472432640 (451M) [application/x-tar]

Saving to: “mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar”

100%[===========================================================================================

2017-10-12 11:20:48 (1.90 MB/s) - “mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar” saved [472432640/47

3、查看文件!

[[email protected] src]# file mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar: POSIX tar archive (GNU)

4、创建mysql-5.7的目录

[[email protected] src]# mkdir mysql-5.7

5、解压RPM包到mysql-5.7文件夹中

[[email protected] src]# tar -xf mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar -C mysql-5.7/

6、****检查操作系统上是否安装了MySQL

[[email protected] backup]# rpm -qa |grep mysql 
qt-mysql-4.6.2-26.el6_4.x86_64 
mysql-5.1.71-1.el6.x86_64 
mysql-server-5.1.71-1.el6.x86_64 
mysql-devel-5.1.71-1.el6.x86_64 
mysql-libs-5.1.71-1.el6.x86_64

删除MyQL(RedHat6.3服务器自带的mysql-libs是mysql-libs-5.1.61-4.el6.x86_64,可能会和高版本的mysql-libs有冲突)

yum remove mysql-libs

7、单独安装报错(一般都是依赖安装的有问题)!

[[email protected] mysql-5.7]# rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm

warning: mysql-community-server-5.7.19-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

error: Failed dependencies:

libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64

libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64

libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64

mysql-community-client(x86-64) >= 5.7.9 is needed by mysql-community-server-5.7.19-1.el6.x86_64

mysql-community-common(x86-64) = 5.7.19-1.el6 is needed by mysql-community-server-5.7.19-1.el6.x86_64

[[email protected] mysql-5.7]# ll

total 461372

-rw-r--r-- 1 7155 31415 23618024 Jun 24 20:08 mysql-community-client-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 336268 Jun 24 20:08 mysql-community-common-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 3747580 Jun 24 20:08 mysql-community-devel-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 39248236 Jun 24 20:08 mysql-community-embedded-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 136599912 Jun 24 20:08 mysql-community-embedded-devel-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 2177644 Jun 24 20:09 mysql-community-libs-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 1723316 Jun 24 20:09 mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 159680896 Jun 24 20:09 mysql-community-server-5.7.19-1.el6.x86_64.rpm

-rw-r--r-- 1 7155 31415 105292128 Jun 24 20:09 mysql-community-test-5.7.19-1.el6.x86_64.rpm

8、有网络的情况,用如下的安装方式安装,安装成功。

[[email protected] mysql-5.7]# yum install ./*.rpm

9、启动mysql

[[email protected] mysql-5.7]# service mysqld start

Initializing MySQL database: [ OK ]

Starting mysqld: [ OK ]

[[email protected] mysql-5.7]#

[[email protected] mysql-5.7]# grep 'temporary password' /var/log/mysqld.log

2017-10-12T07:20:33.419494Z 1 [Note] A temporary password is generated for [email protected]: ?OJo0_Wrpv70

[[email protected] mysql-5.7]#

10、进入mysql ,修改mysql的密码。

[[email protected] mysql-5.7]# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 5

Server version: 5.7.19

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>

ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';

以上,MySQL 5.7.10安装完成。

之后还可以放开防火墙、设定自启动、增强MySQL安全设置等。

iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

/etc/init.d/iptables save

chkconfig mysqld on

mysql_secure_installation

原文地址:http://blog.51cto.com/2572787/2091124

时间: 2024-11-07 09:17:28

Centos6.9安装Myql数据库RPM包的相关文章

编译安装apm+xcache, rpm包, php module;

编译安装:apm+xcache, rpm包, php module: #由于时间关系是直接发PDF:

CentOS6.5 安装Python 的依赖包

1.CentOS6.5 安装Python 的依赖包 yum groupinstall "Development tools"yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 2.下载Python3.5的源码包并编译 wget https://www.p

使用该方法在ubuntu下安装flashplayer的rpm包

Ubuntu的软件包格式是deb,如果要安装rpm的包,则要先用alien把rpm转换成deb. sudo apt-get install alien #alien默认没有安装,所以首先要安装它 sudo alien xxxx.rpm #将rpm转换位deb,完成后会生成一个同名的xxxx.deb sudo dpkg -i xxxx.deb #安装 注意,用alien转换的deb包并不能保证100%顺利安装,所以可以找到deb最好直接用deb 有时候,我们想要使用的软件并没有被包含到 Ubunt

centos6.5安装oracle数据库详细

折腾了好久,总结一下分享希望能帮助有需要的童鞋. 1.官方网站下载http://www.oracle.com/cn/downloads/index.html 安装包,有2个包,大约2GB左右 包名称: linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 我是用迅雷下载的存在本地一份再用WinSCP传到服务器上 服务器信息 配置要求什么检查的就不说了,精简详细说明关键步骤 服务器信息 [root@template

二级制包安装Tomcat 与 RPM包安装Tomcat

1:下载二级制包 wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.0.47/bin/apache-tomcat-8.0.47.tar.gz 2:解压,且创建连接文件 tar xf apache-tomcat-8.0.47.tar.gz -C /usr/local ln -s /usr/local/apache-tomcat-8.0.47 /usr/local/tomcat 3:编辑/etc/profile.d/tomcat.sh文件

软件包安装方法、rpm包介绍、rpm、yum、

安装软件包的三种方法 window的exe文件就是二进制包,不能使用记事本文本打开. Linux下的ls命令文件也是二进制的. rpm工具.类似Windows的exe 源码包 就是源代码.需要编译器编译可执行文件 Yum工具 操作的是rpm包.Yum工具是Python开发.自动安装依赖的包.Yum就像手机应用宝找到什么下载安装 rpm包介绍 设置光驱并挂载 虚拟机光盘.右键连接 [[email protected] ~]# mount /dev/cdrom /mnt/ [[email prote

centos6.6安装mysql数据库

1:查看服务器上面是否已经安装了mysql数据库.rpm -qa | grep mysql 如果有删除数据库rpm -e   mysql;或是rpm -e  --nodeps mysql; 2:通过yum来进行mysql安装  yum install -y mysql-server mysql mysql-devel 3:启动mysql服务  service mysqld start 4:设置开机启动chkconfig  mysqld on 补充: 在第一次启动mysql服务时,会进行数据库的初

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.5-x86_64.tar 1.在windows系统中下载好tar包,在centos中用rz命令导入到/home/tools/目录

『原创』CentOS6.5安装Redis数据库

1.以安装redis2.8.19为例 下载安装包:http://redis.io tar zxvf redis-2.8.19.tar.gz #解压 cd redis-2.8.19 #进入解压后的文件夹 yum install gcc #可能需要先安装GCC make #编译 如果编译出错:error: jemalloc/jemalloc.h: No such file or directory 解决方案: make MALLOC=libc #编译 cd src && make instal