CentOS 下安装MySQL 默认源为5.1版本
apt-get install mysql-server
CentOS下直接yum安装
[root@10-4-5-9 ~]# yum list mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
mysql.x86_64 5.1.73-3.el6_5 updates
[root@10-4-5-9 ~]# wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
[root@10-4-5-9 ~]# ls
anaconda-ks.cfg epel-release-5-4.noarch.rpm install.log install.log.syslog
[root@10-4-5-9 ~]# rpm -ivh epel-release-5-4.noarch.rpm
#查看MySQL版本
[root@10-4-5-9 ~]# yum --enablerepo=remi,remi-test list mysql mysql-server
#安装MySQL
yum install mysql-server --enablerepo=remi
#查看安装好后的MySQL
[root@10-4-5-9 ~]# rpm -qa | grep mysql
mysql-5.5.39-1.el6.remi.x86_64
mysql-libs-5.5.39-1.el6.remi.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-server-5.5.39-1.el6.remi.x86_64
#启动MySQL
[root@10-4-5-9 ~]# service mysqld start
Starting mysqld: [ OK ]
#登陆MySQL
[root@10-4-5-9 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.39 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2014, 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>
#查看MySQL用户
mysql> SELECT user,host FROM mysql.user;
+------+-----------+
| user | host |
+------+-----------+
| | 10-4-5-9 |
| root | 10-4-5-9 |
| root | 127.0.0.1 |
| root | ::1 |
| | localhost |
| root | localhost |
+------+-----------+
6 rows in set (0.00 sec)
#删除空用户
DROP USER ''@'10-4-5-9'; DROP USER ''@'localhost'; DROP USER 'root'@'::1';
#修改密码
mysql> UPDATE mysql.user SET password = PASSWORD('********') WHERE user = 'root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
#重新登陆
[root@10-4-5-9 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.39 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2014, 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>
一切OK。。。
CentOS 下安装MySQL 默认源为5.1版本的更多相关文章
- Centos下安装mysql 和挂载硬盘
一,CentOS下安装Mysql 6.5 1.检测系统是否自带安装mysql # yum list installed | grep mysql 2.删除已经安装的Mysql # yum -y rem ...
- Centos下安装mysql 总结
一.MySQL安装 Centos下安装mysql 请点开:http://www.centoscn.com/CentosServer/sql/2013/0817/1285.html 二.MySQL的几个 ...
- 【linux系列】Centos下安装mysql数据库
前言 为了测试方便,通常我们会自己安装数据库,以下是在Centos上安装Mysql的操作. 一.检查自己是否安装了MySQL数据库 [root@s201 /home/mysql]#rpm -qa |g ...
- CentOS下安装mysql及配置使用
最近一直使用的是CentOS,平时用的最多的数据库是Sql Server,对于mysql还停留在上学的时候,早已忘得一干二净,写这篇内容目的是,重新学习如何安装使用mysql. 一.安装mysql 操 ...
- CentOS下安装Mysql数据库
其实,安装mysql数据库还是比较容易的,安装方式可以分为源码安装和二进制包安装.安装简单,只需要 yum安装几个包就可以搞定,安装后续其实还需要简单做些工作,才可以使用. 环境:CentOS 6.5 ...
- CentOS下安装MySQL
首先通过网络链接的方式在线安装上mysql服务器端吧!(备注:我开始登录服务器的时候是用的其他用户而不是超级管理员,所以安装MySQL的时候需要切换到超级管理员才可以实现软件的正确安装.命令则是:su ...
- Linux/CentOS下安装MySql RPM Bundle
一.下载对应的版本的MySql安装文件 1.下载路径 https://dev.mysql.com/downloads/mysql/ 2.选择对应的Linux版本和x86/x64位的安装文件 查看Lin ...
- Linux CentOs 下 安装 mysql nginx redis
SCP 的使用 来源于: https://blog.csdn.net/qq_30968657/article/details/72912070 scp [参数] <源地址(用户名@IP地址或主机 ...
- Linux(Centos)下安装MySQL
转载:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 一.mysql简介 说到数据库,我们大多想到的是关 ...
随机推荐
- Using Windows Server 2012 Backup for Hyper-V Virtual Machines. Error 80780176 - The specified component was not reported by the VSS writer.
https://social.technet.microsoft.com/Forums/windowsserver/en-US/1a1e0066-f421-43d6-970b-1e20e674cdf9 ...
- iOS-实现最简单的画线功能 . 转
前提:CoreGraphics.framework - (void)viewDidLoad { [super viewDidLoad]; UIImageView *imageView=[[UIImag ...
- IOC详解和Unity基础使用介绍
说起IOC,可能很多初学者不知道是用来做什么的,今天正好有点时间,就来扫扫盲,顺便巩固下自己. IOC全称是Inversion Of Control,意为控制反转(这些自然百度也有),可什么是控制反转 ...
- 【mysql】在mysql中更新字段的部分值,更新某个字符串字段的部分内容
在mysql中更新字段的部分值,更新某个字符串字段的部分内容 sql语句如下: update goods set img = REPLACE(img,'http://ozwm3lwui.bkt.clo ...
- facebook开源项目集合
Facebook的开源大手笔 1. 开源Facebook平台代码 Facebook在2008年选择将该平台上的重要部分的代码和应用工具开源.Facebook称,平台已经基本发展成熟,此举可以让开发 ...
- 测试 Nginx 作为前端下各种模式的性能
测试环境: 1:Nginx 独立处理静态面页请求 5000,开了60个线程 2:Nginx作为前端请求转给 Weblogic 12c 处理 (Spring 4.0平台下的动态面页效果如图) 3:Ngi ...
- 修改后无警告全面支持non-ARC以及ARC的OpenUDID
OpenUDID Open source initiative for a universal and persistent UDID solution for iOS. 首创的给iOS提供设备唯一标 ...
- java操作mongodb时,对象bean和DBObject相互转换的方法
package com.iqbon.spider.util; import java.lang.reflect.Field; import java.lang.reflect.InvocationTa ...
- 试用log4jdbc
近日发现一个好东东log4jdbc,他是一个JDBC驱动器,能够记录SQL日志和SQL执行时间等信息.log4jdbc使用SLF4J(Simple Logging Facade For Java)作为 ...
- 阿里巴巴分布式服务框架 Dubbo
1.Dubbo是阿里巴巴内部的SOA服务化治理方案的核心框架,每天为2000+ 个服务提供3,000,000,000+ 次访问量支持,并被广泛应用于阿里巴巴集团的各成员站点.Dubbo自2011年开源 ...