环境:Centos6.5

查看centos版本:

[root@localhost ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)

1.查看是否安装了mysql

[root@localhost ~]# rpm -qa | grep 'mysql'
[root@localhost ~]#

显示没有安装。

2.安装mysql客户端

[root@localhost ~]# yum -y install mysql
[root@localhost ~]#

3.安装mysql服务端

[root@localhost ~]# yum -y install mysql-server mysql-devel
[root@localhost ~]#

4.安装mysql客户端和服务端

[root@localhost ~]# yum -y install mysql mysql-server mysql-devel
[root@localhost ~]#

5.查询mysql是否已安装完成

以安装mysql客户端和服务端为例:

[root@localhost ~]# rpm -qa | grep 'mysql'
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-devel-5.1.73-8.el6_8.x86_64
mysql-5.1.73-8.el6_8.x86_64
mysql-server-5.1.73-8.el6_8.x86_64
[root@localhost ~]#

6.启动mysql

[root@localhost ~]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost ~]#

或使用下面命令:

[root@localhost ~]# /etc/init.d/mysqld start
Starting mysqld:                                           [  OK  ]
[root@localhost ~]#

7.查看mysql状态

[root@localhost ~]# service mysqld status
mysqld (pid  3043) is running...
[root@localhost ~]#

8.进入mysql

进入mysql---注:mysql安装后的root默认没有密码。

以root用户名进入mysql:

[root@localhost ~]# mysql -uroot -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>

9.将mysql设置开机启动项

[root@localhost ~]#chkconfig mysqld on
[root@localhost ~]#

好了,此时安装mysql完成了。

转载于:https://blog.51cto.com/tommyking/1934216

CentOS6.5下通过yum仓库安装mysql相关推荐

  1. 使用yum命令安装mysql_Linux Centos 下使用yum 命令安装mysql实现步骤

    linux centos 下使用yum 命令安装mysql实现步骤 1. 查看服务器中有没有安装过mysql 1. 查看有没有安装包: yum list mysql* #移除已经安装的mysql yu ...

  2. CentOS 下使用yum 命令安装MySQL

    CentOS Linux下使用yum 命令安装MySQL过程记录. 1. 查看服务器中有没有安装过MySQL 1. 查看有没有安装包:     yum list mysql*     #移除已经安装的 ...

  3. linux的mysql本地yum安装_Linux Centos 下使用yum 命令安装mysql实现步骤

    Linux Centos 下使用yum 命令安装mysql实现步骤 1. 查看服务器中有没有安装过Mysql 1. 查看有没有安装包: yum list mysql* #移除已经安装的mysql yu ...

  4. centos mysql安装包_Centos7下安装包方式安装MySQL

    安装包下载地址:https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar 第一步:在 /h ...

  5. centos7.2安装mysql5.7_Centos7.2下使用YUM快速安装MySQL5.7的方法

    卸载系统自带mariadb数据库 # rpm -qa| grep mariadb # rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64 下 ...

  6. centos lnmp源码安装mysql_CentOS 6.6 下源码编译安装MySQL 5.7.5

    说明:CentOS 6.6 下源码编译安装MySQL 5.7.5 1. 安装相关工具 # yum -y install gcc-c++ ncurses-devel cmake make perl \ ...

  7. nat123linux.sh,Centos6.5下对nat123的安装以及使用

    前面我有篇文章有说道在我们本地做开发调试的过程中常用到的一个映射工具nat123,简单的文章介绍可以参见[nat123内网地址公网映射实现] ,这里我来说说如何在Centos6.5下对nat123的安 ...

  8. 用本地光盘建yum仓库安装Gcc

    Centos用本地光盘建yum仓库安装Gcc 这几天需要搭建一个Centos的环境, 然后就丢过来一个裸机-.然后就开始一顿操作开始装--.(然而并不是Vmware workstation的那种简易安 ...

  9. 阿里云服务器CentOS7版本yum方式安装mysql

    首先推荐一个类似xshell的服务器管理软件FinalShell 下载地址:http://www.hostbuf.com/ 非常好用! 1.确保服务器系统处于最新状态 [root@centos7 ~] ...

最新文章

  1. 【Cmake】执行cmake命令时报错:No XSLT processor found
  2. H3C交换机配置本地和远程登录用户名和密码
  3. [YTU]_2478( C++习题 虚函数-计算图形面积)
  4. python vscode_VScode 配置为Python编辑器
  5. General error: 24374 OCIStmtFetch: ORA-24374: define not done before fetch or execute and fetch
  6. 【团队建设问题】项目管理方面
  7. 阿里 P8 聊分布式事务最终一致性的 6 种解决方案
  8. 条件随机场(CRF)相关理论知识
  9. 时空大数据实践之GeoWave安装部署实践
  10. lnmp mysql 远程访问_LNMP环境下 远程连接mysql数据库
  11. add python3.8 to path_手把手教你安装Python3.8环境
  12. 年薪20万软件测试工程师都具备的能力,你有吗?
  13. 用thymeleaf转化日期格式的方法
  14. Project: 项目经理新建资源预订
  15. 【解决方案】钉钉直播课堂挂机被点到名字怎么办
  16. JAVA程序设计教程-第2版-雍俊海 介绍以及 PDF+源代码+ppt 下载链接
  17. 有源滤波器matlab/simulink 采用simulink搭建有源滤波器模型,有操作视频和报告资料,运行稳定,效果显著
  18. 计算机软件编程英语词汇(二)
  19. php去除图片水印源代码,基于python的图片修复程序(实现水印去除)
  20. SQL Server 数据库修复专家SQLRescue

热门文章

  1. Android动态加载黑科技 动态创建Activity模式
  2. python导入csv文件是如何预览后10行-使用python中的csv reader只读取前N行csv文件
  3. miui 8.5 android,小米MIUI 8.5稳定版更新来了:直达服务功能秒开应用
  4. Java设计模式(二十二):原型设计模式
  5. 大一计算机课程ppt作业,大学生计算机基础作业PPT.ppt
  6. 魔兽世界怀旧服最新服务器开发时间,怀旧服开70最新消息汇总 魔兽怀旧服TBC开放时间几个阶段?...
  7. js实现撤销恢复_我们常用的撤销和恢复功能,它们使用了什么设计模式实现吗?...
  8. 关于documentFrgament 文档片段的简单理解
  9. adb 相关问题总结
  10. [SCOI2010]生成字符串