当前位置:网站首页>Linux安装Mysql(包成功!!)
Linux安装Mysql(包成功!!)
2022-06-22 20:24:00 【kjshuan】
1.安装wget
yum install -y wget
2.备份
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
3.更换阿里云yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4. 清除YUM缓存并建立缓存
yum clean all
yum makecache
5.查询mariadb并卸载
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64(复制当前环境的mysql 注意看自己mariadb的版本)
6.下载mysql的repo源并安装rpm包
cd /opt/
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
7. 安装mysql
yum install mysql-server -y
8.授予权限
chown -R root:root /var/lib/mysql
chown root /var/lib/mysql/
9.重启mysql数据库
service mysqld restart
10.登录mysql数据库并授权
mysql -u root -p
use mysql
update user set Password = password('ok') where User='root';
GRANT ALL PRIVILEGES ON *.* TO [email protected]"%" IDENTIFIED BY "ok";11.使配置生效并退出
flush privileges;
exit
12.安装vim并设置字符集
yum install -y vim
vim /etc/my.cnf
添加
character-set-server=utf8
13.重启mysql
service mysqld restart
14.登录mysql数据库
mysql -uroot -pok
边栏推荐
- 【ICML2022】利用虚拟节点促进图结构学习
- The machine that lies in the 52nd monthly race of Niuke (the complexity of interval assignment operation from O (n^2) to o (n))
- Lesson 025: Dictionary: after class test questions and answers when the index is not easy to use
- 75- when left join encounters subquery
- 万字长文 | 使用 RBAC 限制对 Kubernetes 资源的访问
- Jerry's plug-in 4m flash to view the processing method with a size of only 1m on the PC [chapter]
- Analysis of fegin
- Lesson 031: permanent storage: pickle a jar of delicious pickles | after class test questions and answers
- RealNetworks vs. 微软:早期流媒体行业之争
- Is data scientist a promising profession?
猜你喜欢
![Jerry's near end tone change problem of opening four channel call [chapter]](/img/03/f08cd660c1c602aa08218c4c791ec3.png)
Jerry's near end tone change problem of opening four channel call [chapter]

7-1 前序序列创建二叉树

Laravel+ pagoda planning task

One line of code binds swiftui view animation for a specific state

不同网络结构的特征也能进行对比学习?蚂蚁&美团&南大&阿里提出跨架构自监督视频表示学习方法CACL,性能SOTA!
![Kali2021 installing the rtl8188gu wireless network card [tl-wn726n] driver](/img/29/8dd188cc4e909562862b5f2c57c898.png)
Kali2021 installing the rtl8188gu wireless network card [tl-wn726n] driver

The third training of Hongmeng

Leetcode daily question - 513 Find the value in the lower left corner of the tree

基于C语言开发工资管理系统 课程论文+源码及可执行exe文件

2022 question bank and simulated examination for work license of main principals of hazardous chemical business units
随机推荐
杰理之硬件上 DACL 输出,DAC 输出左右声道的声音【篇】
Lesson 019: function: my site listen to my after-school test questions and answers
第025讲:字典:当索引不好用时 | 课后测试题及答案
杰理之在music模式下提示音使用打断模式无法播放的问题【篇】
Campus errand management app Shaanxi Gechuang
杰理之使用 DP 和 DM 做 IO 按键检测注意点【篇】
第030讲:文件系统:介绍一个高大上的东西 | 课后测试题及答案
localStorage、sessionStorage 和 cookie 的区别大总结
2022 a special equipment related management (elevator) examination questions and simulation examination
csv新增一列
75- when left join encounters subquery
84- I am on Internet & lt; 52 SQL statement performance optimization strategies & gt; Some views of
74- how to remedy the loss of Oracle to MySQL for this kind of SQL optimization?
71- analysis of an Oracle DBA interview with Alibaba in 2010
Jerry's problem of opening the near end of four channel call [chapter]
Jerry's music mode obtains the directory of playing files [chapter]
300. longest increasing subsequence ●●
解决phpstudy中mysql无法启动,与本地安装的mysql冲突
300. 最长递增子序列 ●●
万字长文 | 使用 RBAC 限制对 Kubernetes 资源的访问