Centos 7 安装mysql5.7.24二进制 版本
Mysql 二进制安装方法
下载mysql
https://dev.mysql.com/downloads/mysql/
1.解压包
tar xf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
2.实际生产环境
mv mysql-5.7.24-linux-glibc2.12-x86_64 /usr/local/mysql5.7
a.新增Mysql用户组
groupadd mysql
b. 新增用户
opt]# useradd -r -g mysql mysql
C.给mysql 目录权限
chown -R mysql:mysql mysql5.7
3. 到初始化环境的目录
Cd /home/usr/local/mysql5.6/
mkdir data
mkdir log
chown -R mysql:mysql mysql5.7
4.初始化数据和指定安装目录和数据目录
./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql5.7/ --datadir=/usr/local/mysql5.7/data/
6复制启动文件
cp mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
7.修改启动路径
vi /etc/init.d/mysqld
basedir= /usr/local/mysql5.7
datadir= /usr/local/mysql5.7/data
8.增加环境变量 (最下面添加)l
vi /etc/profile
export MYSQL_HOME=" /usr/local/mysql5.7"
export PATH="$PATH:$MYSQL_HOME/bin"
9.刷新配置文件
source /etc/profile
修改配置文件
vi /etc/my.cnf
[client]
port=3306
[mysqld]
basedir=/usr/local/mysql5.7
datadir=/usr/local/mysql5.7/data
#socket=/usr/local/mysql5.7/mysql.sock
socket=/tmp/mysql.sock
user=mysql
#skip-grant-tables
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# 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
[mysqld_safe]
log-error=/usr/local/mysql5.7/log/mysqld.log
pid-file=/usr/local/mysql5.7/data/mysqld.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
11.添加开启自启
chkconfig --add mysqld
chkconfig mysqld on
12.启动mysqld
service mysqld start
netstat -anpt
13.修改密码(密码初始化的时候有个密码)
2018-11-02T02:07:44.574468Z 1 [Note] A temporary password is generated for root@localhost: lXyB0%fi#9-S (这个就是密码)
mysql> help contents
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> help contents
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决办法
1、 修改用户密码
mysql> alter user 'root'@'localhost' identified by 'youpassword';
或者
mysql> set password=password("youpassword");
2、刷新权限
mysql> flush privileges;
mysql> help contents
Centos 7 安装mysql5.7.24二进制 版本的更多相关文章
- [转]阿里云CentOS 7.1使用yum安装MySql5.6.24
阿里云CentOS 7.1使用yum安装MySql5.6.24 作者:vfhky | 时间:2015-06-25 09:43 | 分类:web 在前面两篇文章<2015博客升级记(四):Cent ...
- centos 6.5 下安装RabbitMQ-3.7.28 二进制版本
centos 6.5 下安装RabbitMQ-3.7.28 二进制版本 安装依赖: yum install -y ncurses-devel socat logrotatewxWidgets-deve ...
- Windows Server 2012安装mysql5.7.24记录
系统环境: 一.下载mysql5.7.24安装包 地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads 下载解压到相应的目录,我的路径 ...
- centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'
centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'的解决办法 3.7版本需要一个新的包libffi-de ...
- CentOs 7 安装mysql5.7.18(二进制版本)
1.下载二进制版本安装包.搜狐开源镜像站:http://mirrors.sohu.com/mysql/MySQL-5.7/ , 找 mysql-5.7.18-linux-glibc2.5-x86_ ...
- Centos 7.5安装 Mysql5.7.24
1. 下载 MySQL 本文采用的Linux为是腾讯云 标准型S2 (1 核 1 GB) Centos 7.5 64位 1.1 官网下载地址: https://dev.mysql.com/downl ...
- 基于通用二进制方式安装MySQL-5.7.24(比源码安装MySQL快许多)及破密码
确保系统中有依赖的libaio软件 yum -y install libaio 使用wget命令下载mysql-5.7.24软件包 wget http://mirrors.sohu.com/mysql ...
- CentOS6.6安装mysql-5.7.25二进制安装包简易教程
#####1,安装前首先确认系统版本 [root@bogon:~]# cat /etc/redhat-release CentOS release 6.6 (Final) [root@bogon:~] ...
- centos7安装mysql-5.6.43二进制包
卸载老版本的MySQL.查找并删除mysql有关的文件 # find / -name mysql # rm -rf /usr/lib64/mysql /usr/share/mysql [root@lo ...
随机推荐
- 如何将SQL Server 2000备份的数据库文件还原(升级)为SQL Server 2005或更高版本的数据库?
其实很简单,有两种方法. 方法一:将SQL Sever 2000数据库备份的数据库文件名后面加上“.bak”,然后直接在SQL Sever 2005或者高版本软件里面直接还原即可: 方法二:在SQL ...
- centos7安装mysql5.7修改设置密码策略
centos7操作系统在安装mysql5.7社区版之后会有默认密码,通过grep命令在mysqld.log文件中即可找到,如下所示: 标识位置即在初始化安装时mysql的默认密码,然后通过mysql ...
- python基础学习21----进程
python中的多线程其实并不是真正的多线程,如果想要充分地使用多核CPU的资源,在python中大部分情况需要使用多进程. 进程与线程的使用有很多相似之处,有关线程方面的知识请参考https://w ...
- Windows10下python3.5的sklearn库安装
具体安装方法参考https://blog.csdn.net/HYDMonster/article/details/79766086 但是注意的是,http://www.lfd.uci.edu/~goh ...
- T4学习- 4、Kalman Studio-T4代码生成器
开源代码生成器-Kalman Studio https://github.com/loamen/Kalman.Studio 软件主要功能如下: 1.基于T4的代码生成工具,根据数据库元数据信息生成代码 ...
- linux 的常用命令---------第三阶段
用户管理 为什么需要用户? 答:linux是一个多用户系统 权限管理(使之权限最小化) 用户:它是对系统中的资源做归属的 : 用户组:在用户组中包含一个或者多个用户,每个用户都同时拥有用户组的权限. ...
- MetaMask/provider-engine-2-代码
package.json "main": "index.js", "scripts": { "test": " ...
- MP实战系列(十)之SpringMVC集成SpringFox+Swagger2
该示例基于之前的实战系列,如果公司框架是使用JDK7以上及其Spring+MyBatis+SpringMVC/Spring+MyBatis Plus+SpringMVC可直接参考该实例. 不过建议最好 ...
- Mysql千万级数据删除实操-企业案例
某天,在生产环节中,发现一个定时任务表,由于每次服务区查询这个表就会造成慢查询,给mysql服务器带来不少压力,经过分析,该表中绝对部分数据是垃圾数据 需要删除,约1050万行,由于缺乏处理大数据的额 ...
- STM32 串口中断总结
原文:https://blog.csdn.net/weixin_42480952/article/details/82981409 最近在学习使用dma传输方式进行串口通讯,感觉这个很详细,存一下 . ...