当前位置:网站首页>CentOS7 install MySQL graphic detailed tutorial
CentOS7 install MySQL graphic detailed tutorial
2022-07-31 04:52:00 【jiey0407】
目录
1.?Send the compressed package to the server
7.?安装完之后修改当前目录拥有者为root用户,修改data目录拥有者为mysql
?11.?Add remote login permission
一. 检查是否已经安装过MySQL
这里介绍两种方法
方法一
1.rpm查看mysql安装
rpm -qa|grep -i mysql
2.卸载前关闭mysql服务
rpm -ev --nodepsmysql-community-release-el7-5.noarch
rpm -ev --nodepsmysql-community-common-5.6.38-2.el7.x86_64
…
执行完命令之后再次执行 rpm-qa|grep -i mysql 会发现已经卸载完成.
方法二
1. 执行命令 查找mysql文件夹
find / -name mysql
2. 把查找出的目录删除
rm -rf /run/lock/subsys/mysql /usr/local/mysql /usr/local/mysql/include/mysql /usr/local/mysql/data/mysql /usr/local/mysql/bin/mysql
二.安装MySQL
1.Send the compressed package to the server
我这里用的是mysql-5.6.36 , If you need other versions, you can download them yourself
这里是mysql-5.6.36的压缩包 :
链接:https://pan.baidu.com/s/1Kles21GxwyfEkyqicgyzhQ?pwd=sin7
提取码:sin7
2. 解压文件
tar -zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
3.重命名解压后的文件
mv mysql-5.6.36-linux-glibc2.5-x86_64/ mysql
4.检查是否有mysql用户组和mysql用户
groups mysql
若有----跳过此步
若无----添加
groupadd mysql
useradd -r -g mysql mysql
5.进入mysql目录-----更新权限
cd mysql/
chown -R mysql:mysql ./
6.执行安装脚本
./scripts/mysql_install_db --user=mysql
如果提示 FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:Data::Dumper的话,Then the reason is the lack ofperl-module
yum -y install perl-Module-Install.noarch
安装perl-module模块,等待perl-module安装成功之后,Continue with the previous installation
7.安装完之后修改当前目录拥有者为root用户,修改data目录拥有者为mysql
chown -R root:root ./
chown -R mysql:mysql data
8.启动mysql
./support-files/mysql.server start
9. 修改密码
./bin/mysqladmin -u root password ‘你的密码’
10.登录
./bin/mysql -h127.0.0.1 -uroot -p
Enter the password you just set to log in
11.Add remote login permission
grant all privileges on *.* to [email protected]‘%’ identified by ‘你的密码’;
flush privileges;
12. 将MySQL注册为服务
cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add
mysqld chkconfig mysqld on
service mysqld restart(重启)
service mysqld status (状态)
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在.深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小.自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前.因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- DVWA之SQL注入
- WPF WPF 】 【 the depth resolution of the template
- [R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
- .NET-9.乱七八糟的理论笔记(概念,思想)
- STM32HAL library modifies Hal_Delay to us-level delay
- BUG消灭者!!实用调试技巧超全整理
- idea工程明明有依赖但是文件就是显示没有,Cannot resolve symbol ‘XXX‘
- unity2d game
- WeChat applet uses cloud functions to update and add cloud database nested array elements
- 开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
猜你喜欢
【线性神经网络】softmax回归
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
XSS靶场(三)prompt to win
两个地址池r2负责管地址池r1负责管dhcp中继
Reinforcement learning: from entry to pit to shit
Unity打灵狐者
HCIP Day 10_BGP Route Summary Experiment
MySQL database installation (detailed)
Hand in hand to realize the picture preview plug-in (3)
随机推荐
The input input box displays the precision of two decimal places
数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
MySQL数据库必会的增删查改操作(CRUD)
MySQL基础操作
Blockbuster | foundation for platinum, gold, silver gave nameboards donors
已解决:不小心卸载pip后(手动安装pip的两种方式)
Understanding of the presence of a large number of close_wait states
MySQL常见面试题汇总(建议收藏!!!)
ENSP,划分VLAN、静态路由,三层交换机综合配置
prompt.ml/15中<svg>标签使用解释
Unity打灵狐者
ES 源码 API调用链路源码分析
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
npm、nrm两种方式查看源和切换镜像
.NET-9.乱七八糟的理论笔记(概念,思想)
C language confession code?
ENSP, VLAN division, static routing, comprehensive configuration of Layer 3 switches
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
高斯分布及其极大似然估计
unity2d小游戏