Centos7在线安装MySQL
wget dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum localinstall mysql57-community-release-el7-7.noarch.rpm
yum方式安装:
yum install mysql-community-server
使用tar包安装:https://www.jianshu.com/p/276d59cbc529
登录成功后更新root用户密码:ALTER USER root@localhost IDENTIFIED BY '123456';
贴一下/etc/my.cnf:
[mysqld]
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/data/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd [client]
port=
socket=/usr/local/mysql/data/mysql.sock [mysqld_safe]
log-error=/usr/local/mysql/data/error.log
pid-file=/usr/local/mysql/data/run/mysql.pid #
# include all files from the config directory
#
!includedir /etc/my.cnf.d

/etc/my.cnf.d/mysql-clients.cnf:
#
# These groups are read by MariaDB command-line tools
# Use it for options that affect only one utility
# [mysql] [mysql_upgrade] [mysqladmin] [mysqlbinlog] [mysqlcheck] [mysqldump] [mysqlimport] [mysqlshow] [mysqlslap]
安装完成启动时报错:
Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.]
SELinux is preventing /usr/sbin/mysqld from write access on the directory . For complete SELinux mes
解决办法:
1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态
SELinux status: enabled 、getenforce ##也可以用这个命令检查
关闭SELinux:
、临时关闭(不用重启机器): 复制代码代码如下: setenforce #设置SELinux 成为permissive模式
#setenforce 设置SELinux 成为enforcing模式
、修改配置文件需要重启机器: 修改/etc/selinux/config 文件 将SELINUX=enforcing改为SELINUX=disabled 重启机器即可
修改root用户密码时报错:
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
mysqladmin: unable to change password; error: 'Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 50638, now running 50722. Please use mysql_upgrade to fix this error.'
解决办法:使用如下命令
mysql_upgrade
再次使用命令修改密码:
/usr/bin/mysqladmin -u root password 'root'
修改成功。
Centos7在线安装MySQL的更多相关文章
- linux之CentOS7在线安装Mysql
下载和添加仓库 1.wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2.sudo rpm -iv ...
- Centos7 yum安装mysql(完整版)
1.下载mysql 地址:https://dev.mysql.com/downloads/repo/yum/.选择对应版本下载.
- CentOS7下安装MySQL并配置远程连接
一.CentOS7下安装MySQL数据库 CentOS7默认的安装包里面已经没有 MySQL-Server安装包了,远程镜像中也没有了. 默认的是MariaDB (MySQL的一个分支,开发这个分支的 ...
- CentOS7.4安装MySQL踩坑记录
CentOS7.4安装MySQL踩坑记录 time: 2018.3.19 CentOS7.4安装MySQL时网上的文档虽然多但是不靠谱的也多, 可能因为版本与时间的问题, 所以记录下自己踩坑的过程, ...
- CentOS7 中安装 MySQL
0. 说明 参考 centos7.2安装MySQL CentOS 7 下 Yum 安装 MySQL 5.7 两种方式安装 MySQL 安装 MySQL(yum) & 安装 MySQL(yum) ...
- Linux中在线安装Mysql和修改密码设置服务启动
一.说明:本文教大家在linux下在线安装mysql.网上的很多文章写的太乱,我们只取操作最方便的在线安装方式.本文以Centos为例. 二.安装过程. 1.安装客户端和服务端: (1)检查是否已经安 ...
- centos7 yum 安装mysql
介绍在CentOS7上yum安装数据库服务器MySQL Community Server 5.7的方法. 准备 CentOS7默认安装了和MySQL有兼容性的MariaDB数据库,在我们安装MySQL ...
- CentOS7.5 安装MySql教程
CentOS7位安装MySql教程 1.先检查系统是否装有mysql rpm -qa | grep mysql 2.下载mysql的repo源 wget http://repo.mysql.com/m ...
- centos7在线安装mysql8.0.16
一.官网复制安装源地址: 1.进入官网地址:https://dev.mysql.com/downloads/repo/yum/ 二.进入/usr/local目录下 ,创建mysql文件夹 三.使用命令 ...
随机推荐
- Struts2详讲
一 概述 1.什么是Struts2? Struts2是一个在WebWork框架基础上发展起来开源MVC框架. 2.StrutsPrepareAndExecuteFilter StrutsPrepare ...
- 04.CSS选择器-->相邻、通用兄弟选择器
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 转:使用VS Code断点调试PHP
使用VS Code断点调试PHP vs code 使用一款杰出的轻量级代码编辑器,其中的插件工具不胜枚举而且还在不断增加.使用 vs code 调试 PHP 代码更是方便简洁,下面我们来一起看一下. ...
- Phoenix 映射 HBase + Maven
声明 本文基于 Centos6.x + CDH5.x 什么是Phoenix Phoenix的团队用了一句话概括Phoenix:"We put the SQL back in NoSQL&qu ...
- 《你不知道的JavaScript-上卷》笔记
这段时间看了<你不知道的JavaScript>上卷,对很多知识有了重新的认识,所以在这里罗列一些知识点作为巩固. 作用域和闭包 词法作用域 变量赋值操作会执行的两个动作 答:编译器会在当前 ...
- java笔记--ASCII编码认知和转换
ASCII是基于拉丁字母的一套电脑编码系统,主要用于显示英语字符是当今最通用的单字节编码.包括128个字符. --如果朋友您想转载本文章请注明转载地址"http://www.cnblogs. ...
- java字节码文件指令集
网上找的没有指令码这列 自己把它加上 更方便查阅 指令从0x00-0xc9 没有0xba 常量入栈指令 指令码 操作码(助记符) 操作数 描述(栈指操作数栈) 0x01 aconst_null nu ...
- python之路——进程
操作系统背景知识 顾名思义,进程即正在执行的一个过程.进程是对正在运行程序的一个抽象. 进程的概念起源于操作系统,是操作系统最核心的概念,也是操作系统提供的最古老也是最重要的抽象概念之一.操作系统的其 ...
- Python实例---简单的选课系统
要求 思路: 构造方法传递过去学校名称,同时利用UUID创建一个随机字符串,用这个字符串来作为要写入的文件名 利用类的__str__方法来实现类对象接口返回学校名称的操作 利用pickle的dumps ...
- ISA 连接非443端口的https站点提示错误
ISA 连接非443端口的https站点提示错误:12204 The specified Secure Sockets Layer (SSL) port is not allowed. ISA Ser ...