1. mysql官网下载rpm包
[root@slave2 home]# ls
hbase hive mysql mysql57-community-release-el6-11.noarch.rpm zookeeper
2.安装
[root@slave2 home]# yum install mysql-server -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: mirrors.neusoft.edu.cn
* extras: mirrors.nju.edu.cn
* updates: mirrors.nju.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73 -8.el6_8.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8 .el6_8.x86_64
--> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================
Package Arch Version Repository Size
============================================================================================================
Installing:
mysql-server x86_64 5.1.73-8.el6_8 base 8.6 M
Installing for dependencies:
mysql x86_64 5.1.73-8.el6_8 base 895 k
mysql-libs x86_64 5.1.73-8.el6_8 base 1.2 M
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
perl-DBI x86_64 1.609-4.el6 base 705 k
Transaction Summary
============================================================================================================
Install 5 Package(s)
Total download size: 12 M
Installed size: 33 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 12 M
(1/5): mysql-5.1.73-8.el6_8.x86_64.rpm | 895 kB 00:01
(2/5): mysql-libs-5.1.73-8.el6_8.x86_64.rpm | 1.2 MB 00:01
(3/5): mysql-server-5.1.73-8.el6_8.x86_64.rpm | 8.6 MB 00:07
(4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00
(5/5): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:01
------------------------------------------------------------------------------------------------------------
Total 889 kB/s | 12 MB 00:13
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysql-libs-5.1.73-8.el6_8.x86_64 1/5
Installing : perl-DBI-1.609-4.el6.x86_64 2/5
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 3/5
Installing : mysql-5.1.73-8.el6_8.x86_64 4/5
Installing : mysql-server-5.1.73-8.el6_8.x86_64 5/5
Installed:
mysql-server.x86_64 0:5.1.73-8.el6_8
Dependency Installed:
mysql.x86_64 0:5.1.73-8.el6_8 mysql-libs.x86_64 0:5.1.73-8.el6_8 perl-DBD-MySQL.x86_64 0:4.013-3.el6
perl-DBI.x86_64 0:1.609-4.el6
Complete!
3. 修改tmp文件权限
[root@slave2 home]# chmod 777 /tmp/
4.启动mysql Service
[root@slave2 home]# service mysqld start
Starting mysqld: [ OK ]
5.初始化mysql
[root@slave2 home]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
此错误通过(https://jingyan.baidu.com/article/636f38bb21d883d6b946106f.html)方法解决:
停掉MySQL服务:
/etc/init.d/mysqld stop
使用safe模式,进行重启:
mysqld_safe --skip-grant-tables
使用root账户,无密码登录:
mysql -u root
选择mysql database:
use mysql;
为root用户更改密码为: 123(自行设定):
update user set password=PASSWORD("123") where User = 'root';
- CentOS6.5安装MySQL5.6
CentOS6.5安装MySQL5.6,开放防火墙3306端口,允许其他主机使用root账户密码访问MySQL数据库 查看操作系统相关信息 ** 该查看方法只适用于CentOS6.5 (lsb_rel ...
- centos6.5安装Mysql5.6及更改密码
(一) centos6.5安装Mysql5.6 二进制文件安装的方法分为两种: 第一种是不针对特定平台的通用安装方法,使用的二进制文件是后缀为.tar.gz的压缩文件: 第二种是使用RPM或其他包进行 ...
- Centos6.5安装MySQL5.6备忘记录
Centos6.5安装MySQL5.6 1. 查看系统状态 [root@itzhouq32 tools]# cat /etc/issue CentOS release 6.5 (Final) Kern ...
- CentOS6.5安装mysql5.7
CentOS6.5安装mysql5.7 查看mysql的安装路径: [root@bogon ~]# whereis mysql mysql: /usr/bin/mysql /usr/lib/mysql ...
- 第三百九十九节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署CentOS6.5安装mysql5.6
第三百九十九节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署CentOS6.5安装mysql5.6 1.检测系统是否已经安装过mysql或其依赖,若已装过要先将其删除,否则第4步 ...
- centos6.8安装mysql5.6【转】
首先先要去看看本机有没有默认的mysql, 本地默认有的,我们应先卸载,在安装新的这个逻辑. rpm -qa | grep mysql 我本机默认安装的mysql5.1.73 下一步删除 rpm -e ...
- centos6.6安装mysql5.7.6(采用MySQL Yum Repository)—(先看最后一行)
在centos6.6系统上采用MySQL Yum Repository安装mysql5.7.6: 帮助文档:http://dev.mysql.com/doc/refman/5.7/en/linux-i ...
- centos6.8安装mysql5.5
在使用阿里云的时候发现centos6.8系统自带的源当中没有mysql5.5,在网易这些源里面也是5.1的版本.这里安装mysql5.5的话需要另外添加一个源. 1.查看是否已经安装了MySQL rp ...
- Centos6.5安装mysql5.7详解
最近在linux上面安装mysql5.7上真是遇到了很多坑,真是让人头疼,在这里跟大家简单分享一下流程跟注意的地方. 1.查看linux版本是6.5 cat /etc/redhat-release 2 ...
- Centos6.6安装MySQL5.6.24
1.首先需要编译器gcc 编译器和cmake yum -y install gcc+ gcc-c++ cd /usr/local/src wget http://www.cmake.org/files ...
随机推荐
- sql里 where和order by一起使用是怎样的顺序
where 列2 = ‘条件1’ 这个先执行过滤后的数据 再order by ‘条件2’最后取第一条数据也就是先where 再order by 再limit
- java中的ArrayList 、List、LinkedList、Collection
原文地址: http://www.cnblogs.com/liqiu/p/3302607.html 一.基础介绍(Set.List.Map) Set(集):集合中的元素不按特定方式排序,并且没有重复对 ...
- 用C语言解决python多线程中的GIL问题
在使用python多线程的时候为了解决GIL问题,有些代码得用C语言写,那么就得生成动态链接库. 当创建动态链接库时,独立位置信息(position independent)代码也需要生成.这可以帮助 ...
- 服务器病了吗? Linux 服务器的那些性能参数指标
一个基于 Linux 操作系统的服务器运行的同时,也会表征出各种各样参数信息.通常来说运维人员.系统管理员会对这些数据会极为敏感,但是这些参数对于开发者来说也十分重要,尤其当你的程序非正常工作的时候, ...
- DEVC++ C++ Builder6.0
Devc++安装后无法正常编译程序 出现错误,不知道是什么,可能是不兼容的原因 然后就是一直编译出错,程序是最简单的helloworld程序. 之后选择安装C++ Builder 6.0
- How to set up github to work with Visual Studio 2013
http://michaelcrump.net/setting-up-github-to-work-with-visual-studio-2013-step-by-step/ 1. Create gi ...
- [CMAKE] 详解CMakeLists.txt文件
[快速查询]https://cmake.org/cmake/help/v2.8.8/cmake.html#section_Commands 1 CMake简介 CMake是跨平台编译工具,比make更 ...
- linux上mongodb的安装与卸载
安装 1.下载安装包 wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz 下载完成后解压缩压缩包 tar zxf mon ...
- ALGO-121_蓝桥杯_算法训练_猴子分苹果
问题描述 秋天到了,n只猴子采摘了一大堆苹果放到山洞里,约定第二天平分.这些猴子很崇拜猴王孙悟空,所以都想给他留一些苹果.第一只猴子悄悄来到山洞,把苹果平均分成n份,把剩下的m个苹果吃了,然后藏起来一 ...
- solr Query[转]
一. Query参数 1. CoreQueryParam查询的参数 1) q: 查询字符串,必须的. 2) q.op: 覆盖schema.xml的defaultOperator(有空格时用" ...