当前位置:网站首页>centos7 部署mysql 环境
centos7 部署mysql 环境
2022-06-21 12:30:00 【2022冲鸭】
1.官网下载mysql安装包,官网地址 https://dev.mysql.com/
本次使用 mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz 进行安装
2.将安装包放在/usr/local 下面,并解压
tar -xvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
4、复制mysql到/usr/local/mysql文件夹内
cp mysql-5.7.17-linux-glibc2.5-x86_64 /usr/local/mysql -r
5、添加系统mysql组和mysql用户
groupadd mysql和useradd -r -g mysql mysql
6、进入安装mysql软件目录:执行命令
cd /usr/local/mysql
7.修改属主
chown -R mysql:mysql ./
8、安装数据库之前创建data目录
mkdir /usr/local/mysql/data
9、初始化数据库:

在5.7 初始化需要用到mysqld --initialize

解决办法:
1.将源码包里面的/usr/local/mysql/mysql-5.7.22-linux-glibc2.12-x86_64/share/english/errmsg.sys复制到/usr/share/mysql/errmsg.sys
2.同时清除 data里面的数据,重新初始化

边栏推荐
猜你喜欢

Nanjing University static program analyses -- Introduction learning notes

These three young men are more ruthless than Ma Huateng and Zhang Yiming

简单工厂VS工厂方法&手写自动化工厂——系统学习六

i. MX - rt1052 clock and phase locked loop (PLL) analysis

RPC (remote procedure call protocol)

3D Slicer导入标签与查看标签

Educoder Web练习题---创建下拉列表

最新远程部署运维工具汇总

Summary of UART problems in stm32cubemx

CPU、MPU、MCU、SoC、MCM介绍
随机推荐
Typescript localstorage encapsulation
Educoder Web练习题---页面结点元素
一文掌握SQLite3基本用法
Huawei cloud releases desktop ide codearts
Standing at the digital tuyere, how can tooling enterprises "fly"
channels详细使用说明
Educoder Web练习题---创建文本区域
在数字时代实现IT敏捷性的12个技巧
方法的繼承和重寫
简单工厂VS工厂方法&手写自动化工厂——系统学习六
Summary of UART problems in stm32cubemx
愿山河无恙
Methods commonly used in uniapp (part) - timestamp problem and rich text parsing image problem
[cloud native | Devops] Jenkins installation and actual combat (II)
SQL左连接的关联条件问题
[100 unity stepping pit knowledge points] | draw cube dotted line and sphere dotted line (gizmos auxiliary wireframe) in the editor
自动弹出 微信授权登录窗口
uva11995
[100 unity practical skills] | make the skills or equipment follow the character and rotate continuously in the game
WPF uses Maui's self drawing logic