linux下如何使用yum源安装mysql

目录
  • 使用网络yum源安装mysql
    • (1)检查
    • (2)查看
    • (3)安装
    • (4)启动服务
    • (5)自启动
    • (6)创建管理员
    • (7)登录
  • 总结

使用网络yum源安装mysql

(1)检查

(2)查看

(3)安装

(4)启动服务

(5)自启动

(6)创建管理员

(7)登录

[root@雨ゆこ ~]# yum -y install mysql-devel
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: openssl-devel for package: mysql-devel-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package openssl-devel.x86_64 0:1.0.1e-57.el6 will be installed
--> Processing Dependency: zlib-devel for package: openssl-devel-1.0.1e-57.el6.x86_64
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.1e-57.el6.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.10.3-65.el6 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.10.3-65.el6 for package: krb5-devel-1.10.3-65.el6.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-65.el6.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-65.el6.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-65.el6.x86_64
---> Package zlib-devel.x86_64 0:1.2.3-29.el6 will be installed
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.4-5.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-23.el6 will be installed
---> Package libkadm5.x86_64 0:1.10.3-65.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-7.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-7.el6.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-7.el6.x86_64
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                           Arch                 Version                      Repository          Size
==============================================================================================================
Installing:
 mysql-devel                       x86_64               5.1.73-8.el6_8               base               130 k
Installing for dependencies:
 keyutils-libs-devel               x86_64               1.4-5.el6                    base                29 k
 krb5-devel                        x86_64               1.10.3-65.el6                base               504 k
 libcom_err-devel                  x86_64               1.41.12-23.el6               base                33 k
 libkadm5                          x86_64               1.10.3-65.el6                base               143 k
 libselinux-devel                  x86_64               2.0.94-7.el6                 base               137 k
 libsepol-devel                    x86_64               2.0.41-4.el6                 base                64 k
 openssl-devel                     x86_64               1.0.1e-57.el6                base               1.2 M
 zlib-devel                        x86_64               1.2.3-29.el6                 base                44 k

Transaction Summary
==============================================================================================================
Install       9 Package(s)

Total download size: 2.2 M
Installed size: 5.5 M
Downloading Packages:
(1/9): keyutils-libs-devel-1.4-5.el6.x86_64.rpm                                        |  29 kB     00:00
(2/9): krb5-devel-1.10.3-65.el6.x86_64.rpm                                             | 504 kB     00:00
(3/9): libcom_err-devel-1.41.12-23.el6.x86_64.rpm                                      |  33 kB     00:00
(4/9): libkadm5-1.10.3-65.el6.x86_64.rpm                                               | 143 kB     00:00
(5/9): libselinux-devel-2.0.94-7.el6.x86_64.rpm                                        | 137 kB     00:00
(6/9): libsepol-devel-2.0.41-4.el6.x86_64.rpm                                          |  64 kB     00:00
(7/9): mysql-devel-5.1.73-8.el6_8.x86_64.rpm                                           | 130 kB     00:00
(8/9): openssl-devel-1.0.1e-57.el6.x86_64.rpm                                          | 1.2 MB     00:00
(9/9): zlib-devel-1.2.3-29.el6.x86_64.rpm                                              |  44 kB     00:00
--------------------------------------------------------------------------------------------------------------
Total                                                                          17 MB/s | 2.2 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : zlib-devel-1.2.3-29.el6.x86_64                                                             1/9
  Installing : libcom_err-devel-1.41.12-23.el6.x86_64                                                     2/9
  Installing : libkadm5-1.10.3-65.el6.x86_64                                                              3/9
  Installing : libsepol-devel-2.0.41-4.el6.x86_64                                                         4/9
  Installing : libselinux-devel-2.0.94-7.el6.x86_64                                                       5/9
  Installing : keyutils-libs-devel-1.4-5.el6.x86_64                                                       6/9
  Installing : krb5-devel-1.10.3-65.el6.x86_64                                                            7/9
  Installing : openssl-devel-1.0.1e-57.el6.x86_64                                                         8/9
  Installing : mysql-devel-5.1.73-8.el6_8.x86_64                                                          9/9
  Verifying  : keyutils-libs-devel-1.4-5.el6.x86_64                                                       1/9
  Verifying  : libsepol-devel-2.0.41-4.el6.x86_64                                                         2/9
  Verifying  : openssl-devel-1.0.1e-57.el6.x86_64                                                         3/9
  Verifying  : krb5-devel-1.10.3-65.el6.x86_64                                                            4/9
  Verifying  : libkadm5-1.10.3-65.el6.x86_64                                                              5/9
  Verifying  : libcom_err-devel-1.41.12-23.el6.x86_64                                                     6/9
  Verifying  : libselinux-devel-2.0.94-7.el6.x86_64                                                       7/9
  Verifying  : mysql-devel-5.1.73-8.el6_8.x86_64                                                          8/9
  Verifying  : zlib-devel-1.2.3-29.el6.x86_64                                                             9/9 

Installed:
  mysql-devel.x86_64 0:5.1.73-8.el6_8                                                                         

Dependency Installed:
  keyutils-libs-devel.x86_64 0:1.4-5.el6                  krb5-devel.x86_64 0:1.10.3-65.el6
  libcom_err-devel.x86_64 0:1.41.12-23.el6                libkadm5.x86_64 0:1.10.3-65.el6
  libselinux-devel.x86_64 0:2.0.94-7.el6                  libsepol-devel.x86_64 0:2.0.41-4.el6
  openssl-devel.x86_64 0:1.0.1e-57.el6                    zlib-devel.x86_64 0:1.2.3-29.el6                   

Complete!
[root@雨ゆこ ~]# service mysqle start
mysqle: unrecognized service
[root@雨ゆこ ~]# service mysqld start
Initializing MySQL database:  WARNING: The host '雨ゆこ' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

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 雨ゆこ 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.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

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

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@雨ゆこ ~]# chkconfig --level 2345 mysqld on
[root@雨ゆこ ~]# chkconfig --list|grep mysql*
mysqld         	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@雨ゆこ ~]# mysqladmin -u root password 289178199
[root@雨ゆこ ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, 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              |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> 

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持我们。

(0)

相关推荐

  • 详解Linux 安装 JDK、Tomcat 和 MySQL(图文并茂)

    本文会详细介绍 Windows 上安装虚拟机之后,如何在 Linux 中安装 JDK.Tomcat 和 MySQL 的过程,希望能帮助到你. 首先,这些安装都是在 xshell 中运行的,什么,没有 xshell?好吧,我给你资源.安装之后里面就会有 xshell,直接打开用就行了. 1. 安装 JDK 个人建议安装的时候使用 rpm 包,Linux 中的 rpm 相当于 Windows 中的 exe,使用本文的安装方法无需手动设置环境变量. 在这里给大家提供一份 JDK-8 的资源. 1.1

  • 使用MySQL的yum源安装MySQL5.7数据库的方法

    一.安装配置MySQL的yum源 # 安装MySQL的yum源,下面是RHEL6系列mysql5.6的下载地址: wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm 下面是RHEL6系列mysql5.7的下载地址: wget http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm 安装yum源. rpm -ivh mysql57-c

  • Linux下mysql 8.0安装教程

    本文介绍了如何在Linux下安装MySQL8.0,供大家参考,具体内容如下 准备工作: mysql8.0 rpm文件 测试工具(比如 idea的database工具) 安装步骤: 1. 下载mysql的repo源,下载地址: 进入Linux系统,输入指令: wgethttps://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 2.安装mysql-community-release-el7-5.noarch.rpm包 输入

  • redhat7通过yum安装mysql5.7.17教程

    rhel/centos系列linux操作系统自身没有mysql的源,需要自行下载安装.本文介绍如何安装mysql5.7.x数据库. 第一步:下载源 [root@client ~]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm 注意:选择mysql57-community-releasexxx开头的,不要选择mysql-community-releasexxx那个,带57的才是mysql5.7版本. 第

  • linux下如何使用yum源安装mysql

    目录 使用网络yum源安装mysql (1)检查 (2)查看 (3)安装 (4)启动服务 (5)自启动 (6)创建管理员 (7)登录 总结 使用网络yum源安装mysql (1)检查 (2)查看 (3)安装 (4)启动服务 (5)自启动 (6)创建管理员 (7)登录 [root@雨ゆこ ~]# yum -y install mysql-devel Loaded plugins: fastestmirror Setting up Install Process Loading mirror spe

  • centos7.4系统中yum源安装mysql 5.6

    系统环境:centos7.4 一,查看是否安装有数据库: yum list installed | grep mysqld/mariadb 二,安装centos7系统带有mysql5.6安装包的yum源RPM资源包: rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm yum clean all yum repolist 三,安装msyql5.6: yum -y install mysql-comm

  • Linux Centos 下使用yum 命令安装mysql实现步骤

    Linux Centos 下使用yum 命令安装mysql实现步骤 1. 查看服务器中有没有安装过Mysql 1. 查看有没有安装包: yum list mysql* #移除已经安装的mysql yum remove mysql mysql-server mysql-libs compat-mysql51 rm -rf /var/lib/mysql rm /etc/my.cnf 2. 查看是否还有mysql软件: rpm -qa|grep mysql #如果有的话,继续删除 3. 安装mysql

  • 在Linux中如何轻松删除源安装的软件包

    第1步:安装Stow 在这个例子中,我们使用的是CentOS,因此我们需要扩展的EPEL库.您可以使用以下命令安装它们: yum install epel-release 然后,下面这段命令: yum install stow 按Y确认安装: 现在已经安装了stow,我们必须选择存储包文件的位置. 第2步:选择存储包文件的位置 正常的"make install"命令将包文件复制到各种位置.Stow的工作原理是将它们全部放在一个目录中的一个位置,然后创建符号链接到它们原本应该去的位置.

  • linux 下以二进制的方式安装 nodejs

    在一些linux环境下,安装最新的nodejs比较麻烦,因为受到linux源的影响,往往直接通过yum/apt安装的都不是想要的版本,因此,必须自己去选择对应的版本 来安装.但是,nodejs官方又不会为所有的操作系统打包,而编译安装常常又会遇到依赖问题.所以在一些情况下,我们需要在linux机器上,直接下载官方构建好的产出结果来运行. 例如,我们现在需要安装v10.x版本,我们通过wget下载对应的-linux-x64.tar.gz文件,然后通过tar命令将其解压到~/.lib/目录下.(注意

  • Linux(CentOS7)使用 RPM 安装 mysql 8.0.11的教程

    一.安装准备工作 1.查看 Linux 相关信息(Linux 命令行操作) (1)查看 Linux 版本,用于下载对应的 mysql. [查看 Linux 信息:] uname -a (2)检查是否已经安装过 mysql. [检查 mysql 是否被安装]  rpm -qa | grep -i mysql 若安装过,会输出相关包名 [若有安装过 mysql,则删除相关文件]  rpm -e [--nodeps] 包名(此处包名是上面命令查出来的名字) 2.下载 mysql (1)官网地址 [官网

  • Linux下redis5.0.5的安装过程与配置方法

    一. 下载redis 我一般去这里下载:redis下载地址 也可以自行去官网下载 提示:此处安装的为redis-5.05的版本 二.上传redis安装包(我的安装目录为/data/local/tool/redis-5.0.5) 1.创建目录/data/local/tool并进入该目录 mkdir -p /data/local/tool 2.上传下载好的压缩包 注:我用的xshell的配套工具xftp进行上传 三.安装redis 1.解压 在/data/local/tool目录下执行 [root@

  • 通过yum方式安装mySql数据库的全过程

    目录 Yum方式安装mysql服务 修改密码: 总结 Yum方式安装mysql服务 步骤一:首先下载mysql的yum源配置 wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 步骤二:安装mysql的yum源 yum -y install mysql57-community-release-el7-11.noarch.rpm 步骤三:yum方式安装mysq yum -y install mysql-

  • 详解redis在服务器linux下启动的相关命令(安装和配置)

    1.在redis官网下载安装包 2.将安装包上传到FianlShell 3.建好对应文件路径,切换至安装包所在文件夹下 输入命令:(里面的路径根据实际情况进行改变) tar -zvxf redis-6.0.5.tar.gz -C /urs/local/redis 4.编译:(需要使用gcc,如果linux尚未安装gcc需要先进行安装) 使用命令: yum install gcc-c++ 5.然后进入redis-6.0.5,然后执行make 6.然后输入安装命令: make PREFIX=/urs

随机推荐