Linux CentOS7 安装 Mysql5.7.19
第二次安装会安装失败
1.先停止mysql服务 service mysql stop
2.检查是否卸载干净 find / -name mysql 多用几个命令检查,不要删到其他组件的
3.检查mysql进程是否结束 ps -aux | grep mysql
1.解压文件
[root@centos3 ~]# tar -zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
2.重命名
[root@centos3 ~]# cd /usr/local/
[root@centos3 local]# mv mysql-5.7.19-linux-glibc2.12-x86_64/ mysql
3.配置环境变量
[root@centos3 local]# vi + /etc/profile
[root@centos3 local]# source /etc/profile
4.创建组和用户并授权
[root@centos3 local]# groupadd mysql
[root@centos3 local]# useradd -r -g mysql -s /bin/false mysql
[root@centos3 local]# chown -R mysql mysql/
[root@centos3 local]# chgrp -R mysql mysql/
5.初始化并记住最后的12位密码
[root@centos3 local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --lc_messages_dir=/usr/local/mysql/share --lc_messages=zh_CN
6.修改mysql.server.文件并复制到 /etc/init.d/目录下
[root@centos3 local]# cd /usr/local/mysql/support-files/
[root@centos3 support-files]# vi mysql.server
[root@centos3 support-files]# cp mysql.server /etc/init.d/mysqld
7.重命名my.cnf
[root@centos3 support-files]# mv /etc/my.cnf /etc/my_default.cnf
8.设置开机启动
[root@centos3 support-files]# chmod +x /etc/init.d/mysqld
[root@centos3 support-files]# chkconfig --add mysqld
[root@centos3 support-files]# chkconfig mysqld on
//查看开机启动是否成功
[root@centos3 support-files]# chkconfig --list mysqld
9.启动服务
[root@centos3 support-files]# /etc/init.d/mysqld start
[root@centos3 support-files]# service mysql start
10.登录修改密码,密码就是第5步系统生成的
[root@centos3 support-files]# mysql -uroot -p
mysql> set password=password("1234");
Linux CentOS7 安装 Mysql5.7.19的更多相关文章
- centos7安装mysql5.7.19及配置远程连接
centos7安装mysql5.7.19及配置远程连接------https://blog.csdn.net/Lh19931122/article/details/77996213
- linux centos7 安装mysql-5.7.17教程(图解)
1系统约定安装文件下载目录:/data/softwareMysql目录安装位置:/usr/local/mysql数据库保存位置:/data/mysql日志保存位置:/data/log/mysql 2下 ...
- window和linux(centos7)安装mysql5.7
window mysql 安装步骤 社区版本下载地址: https://dev.mysql.com/downloads/file/?id=474802 下载完成后,得到mysql-installer- ...
- Centos7安装mysql-5.7.19
Centos7安装Mysql 一 mysql下载 地址: https://dev.mysql.com/downloads/mysql/#downloads 二 在centos7上创建安装文件存放.解压 ...
- 【环境部署】centos7安装mysql-5.7.19 group-replication
--mysql高可用官方文档: https://dev.mysql.com/doc/refman/5.7/en/group-replication.html mysql下载地址: https://ww ...
- Linux CentOS7安装Mysql5.7
一.下载mysql mkdir /home/install #创建install目录 在/home/install目录下下载mysql5.7 wget https://cdn.mysql.com//D ...
- CentOS7.2安装mysql-5.7.19多实例
安装多实例之前首先需要先安装mysql,这里就不介绍如何安装mysql了,参考前面的博客:https://www.cnblogs.com/hei-ma/p/9505509.html 安装多实例之前需要 ...
- 转:Linux 编译安装 Mysql5.7
http://broqiang.com/2017/04/18/Mysql-Install-5.7.18-Linux-Compile/ 原文 Linux 编译安装 Mysql5.7 Ubuntu 下快速 ...
- Centos7 安装 MySQL5.7
Centos7 安装 MySQL5.7 一.环境介绍 1.安装包版本介绍 MySQL 有三种安装方式:RPM安装.二进制包安装.源码包安装.我们这篇文章以二进制方式安装MySQL 软件名称 版本 系统 ...
随机推荐
- Log4J:Log4J三大组件:Logger+Appender+Layout 格式化编程详解
快速了解Log4J Log4J的三个组件: Logger:日志记录器,负责收集处理日志记录 (如何处理日志) Appender:日志输出目的地,负责日志的输出 (输出到什么 地方) Layo ...
- TypeMismatchException: Provided id of the wrong type for class zhongfucheng.user.entity.User.
今天在使用SSH框架做项目的时候出现了这个错误,找了我非常非常多的时间!!!!!!! Struts Problem Report Struts has detected an unhandled ex ...
- 【个人笔记】《知了堂》mysql表连接
为什么使用表连接 什么是表连接? 如果数据来自多个表,那么可以采用链接查询的方式来实现.因此表连接就是多个表连接合在一起实现查询效果 表连接的原理 表连接采用的是笛卡尔乘积,称之为横向连接. 笛卡尔乘 ...
- 用postal.js在AngularJS中实现订阅发布消息
点击查看AngularJS系列目录 用postal.js在AngularJS中实现event bus 用postal.js在AngularJS中实现event bus 理想状态下,在一个Angular ...
- PHP中public、protected、private权限修饰符
PHP中有三种访问修饰符 默认是public public(公共的.默认) protected(受保护的) private(私有的) 访问权限 public protected private 类内 ...
- 实例讲解webpack的基本使用第四篇
这一篇来讲解一下webpack的loader的使用,用webpack打包文件,css,img,icon等都需要下载安装对应的loader文件,并且写好配置项,才可以进行打包,废话不多说,直接开始实战. ...
- Spring Boot Document Part II(上)
Part II. Getting started 这一章内容适合刚接触Spring Boot或者"Spring"家族的初学者!随着安装指导说明,你会发现对Spring boot有一 ...
- 翻译:MLAPP(2.2节 概率论简要回顾)
笔者:尝试翻译MLAPP(Machine Learning: a Probabilistic Perspective)一书,供机器学习的学者参考,如有错误理解之处请指出,不胜感激!(如需转载,请联系本 ...
- HDU1698 线段树(区间更新区间查询)
In the game of DotA, Pudge's meat hook is actually the most horrible thing for most of the heroes. T ...
- Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1 ...