centos的6.9版本安装mysql
用yum安装后,执行service命令启动:
[root@centos ~]# yum install mysql-server
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.i686 :5.1.-.el6_8 will be installed
--> Processing Dependency: mysql = 5.1.-.el6_8 for package: mysql-server-5.1.-.el6_8.i686
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.-.el6_8.i686
--> Processing Dependency: libmysqlclient_r.so.(libmysqlclient_16) for package: mysql-server-5.1.-.el6_8.i686
--> Processing Dependency: libmysqlclient_r.so. for package: mysql-server-5.1.-.el6_8.i686
--> Processing Dependency: libmysqlclient.so.(libmysqlclient_16) for package: mysql-server-5.1.-.el6_8.i686
--> Processing Dependency: libmysqlclient.so. for package: mysql-server-5.1.-.el6_8.i686
--> Running transaction check
---> Package mysql.i686 :5.1.-.el6_8 will be installed
---> Package mysql-libs.i686 :5.1.-.el6_8 will be installed
---> Package perl-DBD-MySQL.i686 :4.013-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved =======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Installing:
mysql-server i686 5.1.-.el6_8 os 8.8 M
Installing for dependencies:
mysql i686 5.1.-.el6_8 os k
mysql-libs i686 5.1.-.el6_8 os 1.2 M
perl-DBD-MySQL i686 4.013-.el6 os k Transaction Summary
=======================================================================================================================================================================
Install Package(s) Total download size: M
Installed size: M
Is this ok [y/N]: y
Downloading Packages:
(/): mysql-5.1.-.el6_8.i686.rpm | kB :
(/): mysql-libs-5.1.-.el6_8.i686.rpm | 1.2 MB :
(/): mysql-server-5.1.-.el6_8.i686.rpm | 8.8 MB :
(/): perl-DBD-MySQL-4.013-.el6.i686.rpm | kB :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total kB/s | MB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysql-libs-5.1.-.el6_8.i686 /
Installing : perl-DBD-MySQL-4.013-.el6.i686 /
Installing : mysql-5.1.-.el6_8.i686 /
Installing : mysql-server-5.1.-.el6_8.i686 /
Verifying : mysql-server-5.1.-.el6_8.i686 /
Verifying : mysql-libs-5.1.-.el6_8.i686 /
Verifying : perl-DBD-MySQL-4.013-.el6.i686 /
Verifying : mysql-5.1.-.el6_8.i686 / Installed:
mysql-server.i686 :5.1.-.el6_8 Dependency Installed:
mysql.i686 :5.1.-.el6_8 mysql-libs.i686 :5.1.-.el6_8 perl-DBD-MySQL.i686 :4.013-.el6 Complete!
[root@centos ~]# service mysqld start
Initializing MySQL database: 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 centos 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 ]
我们看到6.9的centos安装的mysql是5.1.73版本的,虽然比较老,毕竟还能用。
接着设置root用户密码:
[root@centos ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.1. Source distribution Copyright (c) , , 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>
mysql>
mysql> select user,password,host from mysql.user;
+------+----------+-------------------+
| user | password | host |
+------+----------+-------------------+
| root | | localhost |
| root | | centos |
| root | | 127.0.0.1 |
| | | localhost |
| | | centos |
+------+----------+-------------------+
rows in set (0.00 sec) mysql> set password for root@localhost=password('');
Query OK, rows affected (0.00 sec) mysql> select user,password,host from mysql.user;
+------+-------------------------------------------+-------------------+
| user | password | host |
+------+-------------------------------------------+-------------------+
| root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | localhost |
| root | | centos |
| root | | 127.0.0.1 |
| | | localhost |
| | | centos |
+------+-------------------------------------------+-------------------+
rows in set (0.00 sec)
接着就可以开始玩了。
centos的6.9版本安装mysql的更多相关文章
- CentOS 6.5以上版本安装mysql 5.7 完整版教程(修订版)
转载自:https://codeday.me/collect/20170524/21861.html 1: 检测系统是否自带安装mysql # yum list installed | grep my ...
- CentOS 7下源码安装MySQL 5.7
网上说linux安装mysql服务分两种安装方法: ①源码安装,优点是安装包比较小,只有几十M左右,缺点是安装依赖的库多,安装编译时间长,安装步骤复杂容易出错: ②使用官方编译好的二进制文件安装,优点 ...
- CentOS双机中Docker下安装Mysql并配置互为主从模式
CentOS双机中Docker下安装Mysql并配置互为主从模式 目录 1.搜索镜像... 1 2.拉取镜像... 1 3.绑定端口: 1 4.配置文件(修改/etc/mysql/my.cnf文件): ...
- Centos 7 官网下载安装mysql server 5.6
Centos 7 官网下载安装 mysql server # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rp ...
- centOS Linux下用yum安装mysql
centOS Linux下用yum安装mysql 第一篇:安装和配置MySQL 第一步:安装MySQL [root@192 local]# yum -y install mysql- ...
- CentOS 6.4下编译安装MySQL 5.6.14
概述: CentOS 6.4下通过yum安装的MySQL是5.1版的,比较老,所以就想通过源代码安装高版本的5.6.14. 正文: 一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server ...
- CentOS 7.2 yum方式安装MySQL 5.7
CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变: 下载mysql的源 wget http://dev.mysql.com/get/mys ...
- CentOS 7下源码安装MySQL 5.6
本文转载,并非原创. 目录 准备工作 运行环境 确认你的安装版本 下载MySQL 安装MySQL 准备安装环境 编译和安装 配置MySQL 单实例配置 单实例配置方法 添加防火墙 启动MySQL 重启 ...
- CentOS 6.4 源码安装MySQL 5.6
1.安装前准备工作 1.1 必备的包 gcc/g++ :MySQL 5.6开始,需要使用g++进行编译.cmake :MySQL 5.5开始,使用cmake进行工程管理,cmake需要2.8以上版本. ...
随机推荐
- 简单理解和使用 C# 委托与事件
委托和事件 委托:委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递,这种将方法动态地赋给参数的做法,可以避免在程序中大量使用If-Else(Switch)语句,同时使得程 ...
- ES基本搜索(1)
1.空搜索 GET <写路径>/_search 返回的结果: eg: GET propdict/doc/_search { , "timed_out": false, ...
- NOI.ac 模拟赛20181103 排队 翘课 运气大战
题解 排队 20% 1≤n≤20,1≤x,hi≤201\le n\le 20, 1\le x,h_i\le 201≤n≤20,1≤x,hi≤20 随便暴力 50% 1≤n≤2000,1≤x,hi≤1 ...
- 180908 python 字符串内建函数
Python 的字符串内建函数 Python 的字符串常用内建函数如下: 序号 方法及描述 1 capitalize()将字符串的第一个字符转换为大写 2 center(width, fillchar ...
- Hi,this is May.
“山有木兮木有枝 心悦君兮君不知” 当一个现在的人正在思念过去的人,世间的一切也都会变成过去的样子. 声色的娱乐,本来就如闪电的光.击石的火.男女欢合不过埋香葬玉.赋别鹤离鸾之曲,臂膀一曲一伸的工夫罢 ...
- P3709 大爷的字符串题 脑子+莫队
简化题意:区间众数出现次数??? 为什么?原因是,贪心的想,我们要划分成尽量少的严格递增序列,这样rp掉的最少. 设区间众数出现次数为 \(x\) ,那我们至少要分成 \(x\) 段严格上升序列. # ...
- C语言中一个字符对应一个ascii码;占一个1个字节8个二进制位;存到内存中也是用ascii的十进制的二进制表示
/** 只读变量和常量 const 只读 const int a; int const a;//同上面的代码行是等价的,都表示一个常整形数. int *const a;//const具有"左 ...
- 使用pytesseract进行图像识别
引言 对于简单验证码及一些图像的识别,我们需要使用pytesseract及相应的Tesseract引擎,它是开源的OCR引擎.帮助我们做一些简单的图像识别 当然为了更好将图片识别,对一些像素比较低的图 ...
- OpenStack RPC框架解析
1 消息队列Rabbitmq介绍 Rabbitmq的整体架构图 (1)Rabbitmq Server:中间那部分就是Rabbitmq Server,也叫broken server,主要是负责消息的传 ...
- vim的四大模式
vim的四大模式 总结了下我经常使用的模式中的一些基本命令 正常模式 通过vim进入到界面, 首次即为正常模式 编辑模式 (i,a,o,s,I,A,S) i: 当前节点插入光标点 a: 下一个字母后插 ...