当前位置:网站首页>centos随笔03:centos8.2安装mysql
centos随笔03:centos8.2安装mysql
2022-06-11 08:17:00 【uikoo9】

【mysql/mariadb】
由于使用的是腾讯云轻应用服务器,这里安装mariadb替代

【dnf/yum】
dnf是yum包管理器的升级,虽然在服务器上这两个命令都可以用,建议使用dnf管理包
【检索mariadb】
dnf search mariadb通过search命令可以检索可以安装的应用包
【安装mariadb】
dnf install mariadb mariadb-server在centos下需要安装mariadb和mariadb-server两个包
【初始化mysql】
mysql_install_db --user=mysql通过初始化命令,可以初始化mysql,初始化成功后有一些提示
【启动mariadb服务】
systemctl start mariadb
systemctl enable --now mariadb启动mariadb的服务,并且配置到启动项内
【设置root密码】
mysqladmin -u root password 'zzzzzz'通过这个命令设置root的密码,尽量设置的复杂一些
【开启一些安全的设置项】
mysql_secure_installation通过提示的方式开启一些安全的设置,
都是一些常见的操作
1.设置root密码
2.删除无关用户
3.禁止非root账号登陆
4.删除test数据库
5.刷新权限等

【登陆mysql】
mysql -uroot -p输入之前设置的密码,就可以登陆mysql了

【感】
现在安装mysql,要比之前简单多了~
边栏推荐
- 使用 COCO 数据集训练 YOLOv4-CSP 模型
- Tutoriel de démarrage bladed (vidéo)
- Typescript recognizable Union
- TRUNC in pytorch_ normal_ principle
- Typescript configuring ts in koa and using koa router
- Sign in system design: how to draw the sign in function
- Post - form data of interface test
- Introduction to the principles of linkedblockingqueue, arrayblockingqueue, synchronousqueue, concurrentlinkedqueue and transferqueue
- E regression test of this featured app
- Methods to improve training speed in deep learning and techniques to reduce video memory (suitable for entry-level trick without too many computing resources)
猜你喜欢

Getting started with bladed tutorial (video)

Anaconda related knowledge supplement (spyder+keras Library)

TypeScript-头文件使用细节

Selenium click the floating menu and realize the functions of right mouse button

Batch splice string

图数据库无缝集成Tushare接口

Js学习基础document.write在页面中写一行文字

【案例解读】医疗单据OCR识别助力健康险智能理赔

这几个小工具也太好用了

How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?
随机推荐
Summary of force deduction questions
C. Managing history (greedy / hashing / thinking / good questions)
自定义ViewGroup的知识点总结-持续更新
记一次忽略@SuppressLint(“NewApi“)提示引发的血案
Node error report sorting
TypeScripy-类的基本使用
Shell编程笔记
Shell Programming Notes
ICML2022有意思的文章
签到体系设计:签到功能该怎么画
134. gas station
2022.6.7 special student simulation
Pycharm启动卡死,loading project
uniapp关闭/开启/调节系统声音
YUV数据的裁剪与重叠
Solve cannot import name 'multiheadattention' from 'tensorflow keras. layers‘
字符设备驱动程序之异步通知机制
Layout of code setting constraintlayout_ constraintDimensionRatio
Basic use of typescripy class
Record a murder case caused by ignoring the @suppresslint ("newapi") prompt