当前位置:网站首页>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
边栏推荐
- 校园跑腿管理端APP—陕西格创
- 79- do not create desc descending index when you see order by XXX desc - there is book donation benefit at the end of the article
- kali2021安装RTL8188GU无线网卡[TL-WN726N]驱动
- 杰理之硬件上 DACL 输出,DAC 输出左右声道的声音【篇】
- 6月25日PMI认证考点防疫要求及考场安排
- Lesson 019: function: my site listen to my after-school test questions and answers
- Kali2021 installing the rtl8188gu wireless network card [tl-wn726n] driver
- Redis learning notes
- 勒索病毒横行下设备该如何进行加密防护
- Lesson 021: functions: lambda expressions | after class test questions and answers
猜你喜欢

什么是数据资产?数据资产管理应该如何落地?

The second harmonyos application development training

Ten thousand words long text | use RBAC to restrict access to kubernetes resources

6-7 图的深度遍历-邻接表实现
![Jerry's plug-in 4m flash to view the processing method with a size of only 1m on the PC [chapter]](/img/8a/49b23eb63ff7e8814d1d49282c9fa2.png)
Jerry's plug-in 4m flash to view the processing method with a size of only 1m on the PC [chapter]

Cannot re-register id: PommeFFACompetition-v0问题解决

ICML2022 | 利用虚拟节点促进图结构学习

Lesson 030: file system: introduce a big thing | after class test questions and answers

Redis learning notes

【ICML2022】利用虚拟节点促进图结构学习
随机推荐
Ten thousand words long text | use RBAC to restrict access to kubernetes resources
软考必备资料大放送,全科目软考资料都给你备好了!
LeetCode#20. Valid parentheses
第014-15讲:字符串 (见小甲鱼新版27讲-32讲)| 课后测试题及答案
Lesson 029: Documents: a task? After class test questions and answers
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemmStridedBatched( ha
6-5 图的深度遍历-邻接矩阵实现
[book delivery at the end of the article] AI has spread all over the Internet to color old photos. Here is a detailed tutorial!
IDC releases China Data Governance Report Yixin Huachen No. 1
Jericho uses DP and DM for IO key detection [chapter]
LeetCode 每日一题——513. 找树左下角的值
7-1 前序序列创建二叉树
数据科学家是不是特有前途的职业?
LeetCode#20.有效的括号
las 点云创建网格
《跟唐老师学习云网络》 - OpenStack网络实现
为了不曾忘却的纪念:孙剑专题
IDC publie le rapport sur la gouvernance des données en Chine
Lesson 025: Dictionary: after class test questions and answers when the index is not easy to use
Learning cloud network from teacher Tang - openstack network implementation