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 软件名称 版本 系统 ...
随机推荐
- Spring security csrf实现前端纯html+ajax
spring security集成csrf进行post等请求时,为了防止csrf攻击,需要获取token才能访问 因此需要添加 <input type="hidden" na ...
- 分区工具fdisk,gdisk,parted
在linux中,当我们给系统添加一块新硬盘时,我们是无法使用的,因为他还没有分区和格式化,只有当我们将新硬盘分区并格式化之后,挂载在某个目录下,才能供我们正常使用,接下来我们要学习三种硬盘分区工具,f ...
- [01] File类
1.IO概念 File类是java.io包中一个很重要的类,这里的io,就是指 Input/Output,所以在看File类之前,先提一下所谓的IO概念. I/O(Input/Output),即输入/ ...
- PeopleRank
PeopleRank:基于PageRank的理论,以每个微博账户的“关注”为链出链接,“粉丝”为链入链接的这种以人为核心的关系. PeopleRank假设条件:– 数量假设:如果一个用户节点接收到的其 ...
- python基础之五大标准数据类型
学习一门语言,往往都是从Hello World开始. 但是笔者认为,在一个黑框框中输出一个"你好,世界"并没有什么了不起,要看透事物的本质,熟悉一门语言,就要了解其底层,就是我们常 ...
- Linux下利用expect,不用交互模式,直接登陆远程主机
Linux环境下只有在机器20.200.254.18上ssh dataconv@20.200.31.23才能连接到23的机器,而且还需要输入密码(每次都需要输入地址,密码很烦),所以利用expect写 ...
- Xcode 上传代码到GitHub
几乎所有iOS程序员都上过GitHub寻找开源类库,的确,GitHub上有大量优秀的开源类库供大家学习.但是如何在Xcode中上传代码至GitHub呢? (开始之前先安装git,具体方法这里讲的很清楚 ...
- 安装 node-sass 时报错
在安装 node-sass 时报错,截图如下 解决方法如下: npm install --save node-sass --registry=https://registry.npm.taobao.o ...
- CentOS7 + Nginx1.13.5 + PHP7.1.10 + MySQL5.7.19 源码编译安装
一.安装Nginx 1.安装依赖扩展 # yum -y install wget openssl* gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng ...
- Windows开启telnet服务 + 连接失败处理
一.控制面板中安装Telnet相关组件 单击"开始"菜单,单击"控制面板" 在控制面板中单击打开"程序和功能"项目 在左侧的蓝色 ...