linux下如何使用yum源安装mysql

   2023-02-07 学习力0
核心提示:目录使用网络yum源安装mysql(1)检查(2)查看(3)安装(4)启动服务(5)自启动(6)创建管理员(7)登录总结使用网络yum源安装mysql(1)检查 (2)查看 (3)安装 (4)启动服务 (5)自启动 (6)创建管理员 (7)登录[root@雨ゆこ ~]# yum -y in

使用网络yum源安装mysql

(1)检查

 linux下如何使用yum源安装mysql

(2)查看

 linux下如何使用yum源安装mysql

(3)安装

linux下如何使用yum源安装mysql

 linux下如何使用yum源安装mysql

linux下如何使用yum源安装mysql

(4)启动服务

 linux下如何使用yum源安装mysql

(5)自启动

 linux下如何使用yum源安装mysql

(6)创建管理员

 linux下如何使用yum源安装mysql

(7)登录

linux下如何使用yum源安装mysql

[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> 

总结

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

原文地址:https://blog.csdn.net/yf289178199/article/details/79490569
 
标签: linux yum源 安装 mysql
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

  • windows10环境下安装Linux子系统---debian
    windows10环境下安装Linux子系统---debian
    windows10环境下安装Linux子系统---debian一、前提1、在控制面板-程序-启用与关闭Windows功能中,勾选“适用于Linux的Windows子系统”  2、首先需要创建一个文件夹,用来存放子系统,在需要的位置创建即可,文件夹名任意3、手动下载Windows子系统发行版包,
    03-08
  • 【强转】QEMU+GDB调试linux内核全过程
    【强转】QEMU+GDB调试linux内核全过程
    昨天更新了一篇名为《QEMU+GDB调试linux内核全过程》[link][https://blog.csdn.net/weixin_37867857/article/details/88138432]的博客,发现排版比较混乱,而且思维也比较混乱。咋一看下来简直是惨不忍睹,而且会给读者在安装过程中一种云里雾里的感觉,加上
    03-08
  • Linux下Bochs,NASM安装和使用 linux bom
    Linux下Bochs,NASM安装和使用 linux bom
    以Ubuntu为例,先更新一下:sudo apt-get updatesudo apt-get upgrade然后安装Bochs环境:sudo apt-get install build-essential xorg-dev libgtk2.0-dev安装NASMNASM官网下载,这以nasm-2.14.02.tar.gz为例:用tar zxvf nasm-2.14.02.tar.gz解压后编译安装cd
    03-08
  • 把玩Alpine linux(一):安装
    把玩Alpine linux(一):安装
    导读Alpine Linux是一个面向安全应用的轻量级Linux发行版。它采用了musl libc和busybox以减小系统的体积和运行时资源消耗,同时还提供了自己的包管理工具apk。Alpine 的内核都打了grsecurity/PaX补丁,并且所有的程序都编译为Position Independent Executabl
    03-08
  • 日志审计与分析实验三(rsyslog服务器端和客户端配置)(Linux日志收集)
    日志审计与分析实验三(rsyslog服务器端和客户
     Linux日志收集一、实验目的:1、掌握rsyslog配置方法2、配置rsyslog服务收集其他Linux服务器日志:C/S架构:客户端将其日志上传到服务器端,通过对服务器端日志的查询,来实现对其他客户端的日志进行集中管理;下面实现就是通过两套机器来实现,(server:19
    03-08
  • Linux学习系列--如何在Linux中进行文件的管理
    Linux学习系列--如何在Linux中进行文件的管理
    文件在常见的Linux的文件系统中,经常使用能了解到的文件管理系统是分为多个文件夹进行管理的。如何查看文件路径 pwd ,在文件目录中,会有一个点(.)代表的是当前目录,两个点(..)代表的是当前目录的上层目录在Linux下,所有以点开始的文件都是“隐藏文件
    03-08
  • [JetBrains] 我想在 Linux 上使用 macOS 键绑定!
    [JetBrains] 我想在 Linux 上使用 macOS 键绑定
    很高兴认识你,我的名字是kitakkun。我最近开始实习,是工程界的新手。顺便说一句,这是我的第一篇文章。你最喜欢的操作系统是什么?视窗?苹果系统?还是Linux?我将它们全部用于不同的目的,但感觉就像 macOS ≒ LinuxWindows。一两个月前,我最喜欢 Linux
    03-08
  • Linux使用nginx反向代理。可实现域名指向特定端
    在配置80指向域名的时候出现端口占用,使用kill -9无法杀死端口,应使用下面的命令来杀死进程killall -9 nginx(使用完本命令需要再把配置过的配置文件重新启动。命令写在了PS下面)后在root权限下的nginx的sbin下使用./nginx -t(命令重启nginx并检查是否有语
    02-13
  • 新换的 Fedora Core Linux 桌面,来秀一秀(多
    1、桌面、终端、文件浏览器,已经设置好字体、自动挂载硬盘,不是很麻烦2、即时通讯:QQ,Skype3、firefox4、D4X、BT、电驴5、开发工具:eclipse netbeans6、openoffice 大开 word 公式文档,输出 PDF7、小企鹅输入法,支持微软双拼8、星际译王,linux 下免费
    02-10
  • fedora linux源代码下载
    fedora linux源代码下载
    yumdownloader --source kernel如果是下载insight就是 yumdownloader --source insight下载到的是当前目录.然后在用rpm2cpio 生成 压缩文件rpm2cpio insight-7.4.50-8.20120403cvs.fc17.src.rpm|cpio -idrpm2cpio 的使用 在 http://www.rpm.org/max-rpm/s1-rp
    02-10
点击排行