当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- Unity资源管理系列:Unity 框架如何做好资源管理
- 扫雷小游戏——C语言
- 参考代码系列_1.各种语言的Hello World
- Gaussian distribution and its maximum likelihood estimation
- Create componentized development based on ILRuntime hot update
- 马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远
- 益智类游戏关卡设计:逆推法--巧解益智类游戏关卡设计
- Explanation of
- PCL calculates the point cloud coordinate maximum and its index
- Vue项目通过node连接MySQL数据库并实现增删改查操作
猜你喜欢
[C language] Detailed explanation of operators
Doris学习笔记之监控
MySQL database installation (detailed)
【线性神经网络】softmax回归
Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
ENSP,划分VLAN、静态路由,三层交换机综合配置
专访 | 阿里巴巴首席技术官程立:云+开源共同形成数字世界的可信基础
Unity Tutorial: URP Rendering Pipeline Practical Tutorial Series [1]
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
Mysql应用安装后找不到my.ini文件
随机推荐
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
The 15th day of the special assault version of the sword offer
[C language] Detailed explanation of operators
mysql数据库安装(详细)
MySQL 8.0.30 GA
MySQL fuzzy query can use INSTR instead of LIKE
重磅 | 开放原子校源行活动正式启动
three.js 制作3D相册
Unity URP渲染管线摄像机核心机制剖析
[Cloud Native] DevOps (5): Integrating Harbor
Open Source Smart Future | 2022 OpenAtom Global Open Source Summit OpenAtom openEuler sub-forum was successfully held
sql语句之多表查询
The third is the code to achieve
unity2d小游戏
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
Go语学习笔记 - 处理超时问题 - Context使用 | 从零开始Go语言
Two address pools r2 are responsible for managing the address pool r1 is responsible for managing dhcp relays
MySQL常见面试题汇总(建议收藏!!!)
MySQL to revise the root password
STM32HAL库修改Hal_Delay为us级延时