当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- ES 源码 API调用链路源码分析
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
- unity2d小游戏
- MySQL修改root账号密码
- Reinforcement learning: from entry to pit to shit
- input输入框展示两位小数之precision
- [Cloud Native] DevOps (5): Integrating Harbor
- The input input box displays the precision of two decimal places
- MySQL数据库增删改查(基础操作命令详解)
- BUG destroyer!!Practical debugging skills are super comprehensive
猜你喜欢
随机推荐
马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远
visual studio 那些提高效率的快捷键,总结(不时更新)
【debug锦集】Expected input batch_size (1) to match target batch_size (0)
Gaussian distribution and its maximum likelihood estimation
ABC D - Distinct Trio(k元组的个数
MySQL database backup
.NET-9.乱七八糟的理论笔记(概念,思想)
MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
BUG消灭者!!实用调试技巧超全整理
Can't load /home/Iot/.rnd into RNG
WPF WPF 】 【 the depth resolution of the template
Sun Wenlong, Secretary General of the Open Atom Open Source Foundation |
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
益智类游戏关卡设计:逆推法--巧解益智类游戏关卡设计
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)
[Cloud Native] DevOps (5): Integrating Harbor
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
【wpf】wpf中的那些模板之深度解析
Understanding of the presence of a large number of close_wait states
ENSP, VLAN division, static routing, comprehensive configuration of Layer 3 switches