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简介 说到数据库,我们大多想到的是关 ...
随机推荐
- js跨域请求提示函数未定义的问题
我的代码是这么写的 window.onload=function(){ function sendRequest(){ var script=document.getElementById(" ...
- JavaScript 新手的踩坑日记
引语 在1995年5月,Eich 大神在10天内就写出了第一个脚本语言的版本,JavaScript 的第一个代号是 Mocha,Marc Andreesen 起的这个名字.由于商标问题以及很多产品已经 ...
- javascript中的2个感叹号的用法
!!是逻辑"非非",即是在逻辑"非"的基础上再"非"一次.通过!或!!可以将很多类型转换成bool类型,再做其它判断. 应用场景:判 ...
- Android中UI设计的一些技巧!!!
出处:http://blog.csdn.net/android_tutor/article/details/5995759 大家好,今天给大家分享的是Android中UI设计的一些技巧,本节内容主要有 ...
- 关于OpenLDAPAdmin管理页面提示“This base cannot be created with PLA“问题. Strong Authentication Required问题
经过查询,最终总结和处理如下: 1.首先需要在/etc/openldap/目录下,创建一个base.ldif文件,如下所示: 2.在base.ldif文件中,写入如下信息,为创建初始化根节点做准备工作 ...
- 使用开源库 EasyTimeline 操作定时器 NSTimer
EasyTimeline https://github.com/mmislam101/EasyTimeline Sometimes you need things to happen at speci ...
- OpenCV学习(36) 人脸识别(1)
本文主要参考OpenCV人脸识别教程:http://docs.opencv.org/modules/contrib/doc/facerec/facerec_tutorial.html 1.OpenCV ...
- iOS开发-CoreMotion框架(加速计和陀螺仪)
CoreMotion是一个专门处理Motion的框架,其中包含了两个部分加速度计和陀螺仪,在iOS4之前加速度计是由UIAccelerometer类来负责采集数据,现在一般都是用CoreMotion来 ...
- jQuery调用WCF需要注意的一些问题
昨天,博客园首页增加了Digg功能.在该功能中我们开始尝试使用jQuery直接调用WCF.之前我们采用的方案是jQuery调用Web Service,然后WebService再调用服务层.这样调用主要 ...
- OA系统权限管理设计方案
(转)OA系统权限管理设计方案 OA系统权限管理设计方案 不同职责的人员,对于系统操作的权限应该是不同的.优秀的业务系统,这是最基本的功能. 可以对“组”进行权限分配.对于一个大企业的 ...