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文件夹 三.使用命令 ...
随机推荐
- Luogu3804:[模板]后缀自动机
题面 luogu Sol \(sam\)然后树形\(DP\) 当时还不会拓扑排序的我 # include <bits/stdc++.h> # define IL inline # defi ...
- 关于修改bug的思考
作者:朱金灿 来源:http://blog.csdn.net/clever101 有软件就有bug,这意味着软件研发不仅仅是新功能开发,更要拿出相当一部分精力去修改bug.但基本很多软件开发者并 ...
- Java设计模式—享元模式
享元模式:是池技术的重要实现方式. 定义如下: 使用共享对象可有效地支持大量的细粒度的对象. 个人理解:享元模式利用共享对象的技术,解决了Java中内存溢出的问题. 享元模式的定义为我们提出了两个要求 ...
- 学习servlet心得
1,关于字符编码问题: // resp.setCharacterEncoding("UTF-8");//这个的作用仅仅只是输出字符,不做格式转换成HTML // resp.setC ...
- vs的一个奇葩错误 : 未能找到任何适合于指定的区域性或非特定区域性的资源...
摘要: VS2005下进行开发的时候遇到的问头:未能找到任何适合于指定的区域性或非特定区域性的资源.请确保在编译时已将“xxx.Form1.resources”正确嵌入或链接到程序集“xxx”,或者确 ...
- 从零开始——JSON ARRAY&JSON OBJECT
在学习“基于角色的权限”的例子中,遇到了json object和json array,因此在一番学习之后对此要点进行粗略整理. 参考: https://my.oschina.net/u/2601842 ...
- SQL Server ->> 高可用与灾难恢复(HADR)技术之 -- Transaction Replication(事务复制)
复制类型: 1)事务型复制:通过复制事务日志到订阅点重做的方式,属于增量型复制: 2)合并型复制:通过触发器和元数据表追踪表数据改变,同样属于增量型复制: 3)快照型复制:通过创建数据库快照,并把快照 ...
- Python问题1:IndentationError:expected an indented block
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- SQL 语句及关键字的用法
一.SELECT select [ALL|DISTINCT] select_list [into new table] FROM table_source [where serch_conditaio ...
- Exchange 接收连接器(Client、Default)区别,OUtlook实际测试
CAS就是接收连接器(110,995): Server Config--Client Access:POP3 and IMAP4:POP3设置 HUB就是发送连接器(25,587) Server Co ...